Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion {{cookiecutter.project_slug}}/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -29,21 +29,24 @@ run:

.PHONY: lint
lint:
uv sync --group lint
uv run ruff format --check && \
uv run ruff check && \
uv run mypy
uv run pyright

{%- if cookiecutter.docstring_coverage %}
uv run interrogate -c pyproject.toml .
{%- endif %}

.PHONY: format
format:
uv sync --group lint
uv run ruff format && \
uv run ruff check --fix

.PHONY: test
test:
uv sync --group test
uv run pytest -svv --timeout=300 --cov=$(PY_IMPORT) $(T) $(TEST_ARGS)
uv run coverage report -m $(COV_ARGS)

Expand Down
27 changes: 8 additions & 19 deletions {{cookiecutter.project_slug}}/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ lint = [
# NOTE: ruff is under active development, so we pin conservatively here
# and let Dependabot periodically perform this update.
"ruff ~= 0.12",
"mypy >= 1.0",
"pyright ~= 1.1.407",
"types-html5lib",
"types-requests",
"types-toml",
Expand Down Expand Up @@ -66,24 +66,13 @@ Source = "https://github.com/{{ cookiecutter.github_username }}/{{ cookiecutter.
# don't attempt code coverage for the CLI entrypoints
omit = ["{{ cookiecutter.__project_src_path }}/_cli.py"]

[tool.mypy]
mypy_path = "src"
packages = "{{ cookiecutter.__project_import }}"
allow_redefinition = true
check_untyped_defs = true
disallow_incomplete_defs = true
disallow_untyped_defs = true
ignore_missing_imports = true
no_implicit_optional = true
show_error_codes = true
sqlite_cache = true
strict_equality = true
warn_no_return = true
warn_redundant_casts = true
warn_return_any = true
warn_unreachable = true
warn_unused_configs = true
warn_unused_ignores = true
[tool.pyright]
include = ["src", "test"]
exclude = []
reportUnusedImport = "warning"
reportUnusedVariable = "warning"
reportGeneralTypeIssues = "error"
typeCheckingMode = "strict"

[tool.ruff]
line-length = 100
Expand Down