Conversation
doismellburning
commented
Apr 3, 2026
- Expand .gitignore to cover common Python artifacts
- Add RUF, PT, SIM, PERF, LOG to ruff lint rules
- Add make clean target to remove generated coverage artifacts
- Add workflow_dispatch trigger and concurrency cancellation to CI
- Set .DEFAULT_GOAL to check so bare make runs a more useful target
- Add py.typed marker for PEP 561 type annotation support
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
PEP 561 defines how packages signal they ship inline type annotations. Without a py.typed marker file, type checkers (mypy, pyright, etc.) will silently ignore a package's type annotations when it is installed as a dependency, even if the source contains full type hints. The marker is an empty file; its presence is the signal. Adding it declares this package as "typed" so that downstream projects benefit from type checking against the package's annotations. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
There was a problem hiding this comment.
Pull request overview
This PR makes small developer-experience and CI improvements for the Python template project, including expanded ignore rules, stricter Ruff linting, a new make clean target, CI workflow concurrency controls, and shipping a py.typed marker for PEP 561 typing support.
Changes:
- Expand
.gitignoreto cover common Python build/venv/cache artifacts. - Tighten Ruff lint rules by enabling additional rule families (RUF/PT/SIM/PERF/LOG).
- Improve automation via
makedefaults/clean target and CI workflow dispatch + concurrency cancellation.
Reviewed changes
Copilot reviewed 3 out of 5 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
src/python_template/py.typed |
Adds PEP 561 marker file to the package. |
pyproject.toml |
Enables additional Ruff lint rule families. |
Makefile |
Sets default goal to check and adds clean target. |
.gitignore |
Adds common Python artifact ignores. |
.github/workflows/test.yml |
Adds workflow_dispatch trigger and concurrency cancellation. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
|
||
| .PHONY: clean | ||
| clean: | ||
| git clean -X |
There was a problem hiding this comment.
The clean target runs git clean -X without -f, so it will typically do a dry-run and not actually remove anything (most Git configs require force for git clean). Consider adding the appropriate force/dir flags or using explicit rm -rf of the generated artifacts you want to clean.
| git clean -X | |
| git clean -fdX |
| .PHONY: clean | ||
| clean: | ||
| git clean -X |
There was a problem hiding this comment.
PR description says the clean target removes generated coverage artifacts, but git clean -X removes all ignored files in the repo (including things like /.venv/ per .gitignore). This is broader and potentially surprising/destructive for local dev. Consider restricting clean to the specific coverage outputs (e.g., .coverage, htmlcov/, etc.) or documenting that it nukes all ignored files.