Update template config: pylint in pyproject, just test args, python 3.12.4 pin

This commit is contained in:
jay
2026-11-09 13:18:04 -05:00
parent 041a9f3943
commit c5522cc649
11 changed files with 30 additions and 62 deletions
-22
View File
@@ -1,22 +0,0 @@
[MASTER]
fail-under=10.0
py-version=3.12
[MESSAGES CONTROL]
disable=raw-checker-failed,
bad-inline-option,
locally-disabled,
file-ignored,
suppressed-message,
useless-suppression,
deprecated-pragma,
use-symbolic-message-instead
[BASIC]
no-docstring-rgx=^_
[REPORTS]
reports=no
[FORMAT]
max-line-length=100
+3 -3
View File
@@ -1,8 +1,8 @@
# {{PKG}}
# {{NAME}}
## Testing
- Baseline: `just test` (wraps `pipenv run pytest`)
- Single test: `pipenv run pytest tests/test_file.py::test_name`
- Single test: `just test tests/test_file.py::test_name`
## Git
- Push to origin after every commit.
@@ -10,7 +10,7 @@
## Quality gate
- Run `just ci` (fmt-check, lint, test) before staging any changes.
- The pre-commit hook is versioned at `hooks/pre-commit`; install it with `just install-hooks`. It re-runs `just ci` at commit time and fails closed if `just` is unavailable.
- Tool config: `.pylintrc` (pylint), `pyproject.toml` (black, isort). Fix mode: `just fmt`.
- Tool config: `pyproject.toml` (black, isort, pylint). Fix mode: `just fmt`.
## Layout
- Flat layout, no packaging step: root `conftest.py` exists only to put the repo root on sys.path for tests.
+1 -1
View File
@@ -13,4 +13,4 @@ isort = "*"
autoflake = "*"
[requires]
python_version = "3.12"
python_version = "{{PYVER}}"
+4 -4
View File
@@ -1,16 +1,16 @@
# Run the full test suite
test:
pipenv run pytest
test *args:
pipenv run pytest -q {{args}}
# Auto-fix imports and formatting (autoflake, isort, black)
fmt:
pipenv run autoflake --recursive --remove-all-unused-imports --remove-unused-variables --in-place {{PKG}} tests conftest.py
pipenv run autoflake --recursive --remove-all-unused-imports --remove-unused-variables --ignore-init-module-imports --in-place {{PKG}} tests conftest.py
pipenv run isort {{PKG}} tests conftest.py
pipenv run black {{PKG}} tests conftest.py
# Verify imports and formatting without modifying files
fmt-check:
pipenv run autoflake --recursive --check --remove-all-unused-imports --remove-unused-variables {{PKG}} tests conftest.py
pipenv run autoflake --recursive --check --remove-all-unused-imports --remove-unused-variables --ignore-init-module-imports {{PKG}} tests conftest.py
pipenv run isort --check-only --diff {{PKG}} tests conftest.py
pipenv run black --check --diff {{PKG}} tests conftest.py
+6
View File
@@ -11,3 +11,9 @@ indent = ' '
multi_line_output = 3
include_trailing_comma = true
known_first_party = ["{{PKG}}"]
[tool.pylint]
fail-under = 10.0
py-version = 3.12
disable = []
max-line-length = 100