[project]
name = 'stub-project'
version = '0.1.0'
description = 'Stub project'
authors = [{ name = 'github.com/cybergrind' }]
license = { text = 'Apache-2.0' }
requires-python = '>=3.14'
dependencies = [
  'ipython',
]

# installed with: uv sync
[dependency-groups]
dev = ['ruff', 'pre-commit>=4.6.2', 'uv>=0.12.17', 'pyrefly>=1.0']

[tool.ruff]
line-length = 120
target-version = 'py314'
indent-width = 4
exclude = ['.venv', '.git']

[tool.ruff.format]
quote-style = 'single'

[tool.ruff.lint.isort]
combine-as-imports = true
known-first-party = []  # e.g. ['my_package']; ruff also detects first-party from `src`
lines-after-imports = 2

[tool.ruff.lint]
ignore = [
  'T201',  # print
  'G004',  # logging format
  'Q000',  # quotes
  'Q001',  # quotes
  'Q003',  # quotes
]
fixable = ['ALL']
select = [
  'E',     # pycodestyle
  'F',     # pyflakes
  'I',     # isort
  'B',     # flake8-bugbear
  'UP',    # pyupgrade
  'C4',    # flake8-comprehensions
  'SIM',   # flake8-simplify
  'G',     # flake8-logging-format
  'ASYNC', # flake8-async
  'PIE',   # flake8-pie
  'T20',   # flake8-print
  'PT',    # flake8-pytest-style
  'Q',     # flake8-quotes
  'RUF',
]
exclude = []

[tool.ruff.lint.flake8-quotes]
docstring-quotes = 'double'
inline-quotes = 'single'
multiline-quotes = 'single'

[tool.pyrefly]
# Without [tool.pyrefly] pyrefly auto-selects the 'basic' preset (high-confidence errors only).
# Adding this section without `preset` silently switches it to the stricter 'default' preset,
# so keep it explicit. Narrow the checked tree with project-includes = ['my_package', 'tests']
# when the repo also holds script-style code that should not block commits.
preset = 'basic'
project-excludes = ['**/.venv/**', '**/.git/**']
