From c5522cc6490a661e345d1b16774abe6440fdcfdf Mon Sep 17 00:00:00 2001 From: Jay Date: Mon, 9 Nov 2026 13:18:04 -0500 Subject: [PATCH] Update template config: pylint in pyproject, just test args, python 3.12.4 pin --- .pylintrc | 22 ---------------------- AGENTS.md | 6 +++--- Pipfile | 2 +- Pipfile.lock | 4 ++-- justfile | 8 ++++---- pyproject.toml | 6 ++++++ template/.pylintrc | 22 ---------------------- template/AGENTS.md | 6 +++--- template/Pipfile | 2 +- template/justfile | 8 ++++---- template/pyproject.toml | 6 ++++++ 11 files changed, 30 insertions(+), 62 deletions(-) delete mode 100644 .pylintrc delete mode 100644 template/.pylintrc diff --git a/.pylintrc b/.pylintrc deleted file mode 100644 index a7befa1..0000000 --- a/.pylintrc +++ /dev/null @@ -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 diff --git a/AGENTS.md b/AGENTS.md index a37e79f..dc85c99 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -1,8 +1,8 @@ -# new_python +# new-python ## 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. diff --git a/Pipfile b/Pipfile index 690109e..4c50589 100644 --- a/Pipfile +++ b/Pipfile @@ -13,4 +13,4 @@ isort = "*" autoflake = "*" [requires] -python_version = "3.12" +python_version = "3.12.4" diff --git a/Pipfile.lock b/Pipfile.lock index 80f7cd8..7a9d330 100644 --- a/Pipfile.lock +++ b/Pipfile.lock @@ -1,11 +1,11 @@ { "_meta": { "hash": { - "sha256": "30532cdf88c6215bc2d5cbe27951c9a3e483aa03c0ecad0b8b2bf3533d5226b5" + "sha256": "7731c495ee4dde25bb5144bb8ec56c2ebfe3914baac63845a94c1d55a9363102" }, "pipfile-spec": 6, "requires": { - "python_version": "3.12" + "python_version": "3.12.4" }, "sources": [ { diff --git a/justfile b/justfile index 5a56723..95acfdf 100644 --- a/justfile +++ b/justfile @@ -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 new_python tests conftest.py + pipenv run autoflake --recursive --remove-all-unused-imports --remove-unused-variables --ignore-init-module-imports --in-place new_python tests conftest.py pipenv run isort new_python tests conftest.py pipenv run black new_python tests conftest.py # Verify imports and formatting without modifying files fmt-check: - pipenv run autoflake --recursive --check --remove-all-unused-imports --remove-unused-variables new_python tests conftest.py + pipenv run autoflake --recursive --check --remove-all-unused-imports --remove-unused-variables --ignore-init-module-imports new_python tests conftest.py pipenv run isort --check-only --diff new_python tests conftest.py pipenv run black --check --diff new_python tests conftest.py diff --git a/pyproject.toml b/pyproject.toml index 9d3a5e0..1eca164 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -11,3 +11,9 @@ indent = ' ' multi_line_output = 3 include_trailing_comma = true known_first_party = ["new_python"] + +[tool.pylint] +fail-under = 10.0 +py-version = 3.12 +disable = [] +max-line-length = 100 diff --git a/template/.pylintrc b/template/.pylintrc deleted file mode 100644 index a7befa1..0000000 --- a/template/.pylintrc +++ /dev/null @@ -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 diff --git a/template/AGENTS.md b/template/AGENTS.md index 272e116..bfc199d 100644 --- a/template/AGENTS.md +++ b/template/AGENTS.md @@ -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. diff --git a/template/Pipfile b/template/Pipfile index 690109e..2bf7279 100644 --- a/template/Pipfile +++ b/template/Pipfile @@ -13,4 +13,4 @@ isort = "*" autoflake = "*" [requires] -python_version = "3.12" +python_version = "{{PYVER}}" diff --git a/template/justfile b/template/justfile index 6ec887d..12a3ea4 100644 --- a/template/justfile +++ b/template/justfile @@ -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 diff --git a/template/pyproject.toml b/template/pyproject.toml index d1188cc..911e79e 100644 --- a/template/pyproject.toml +++ b/template/pyproject.toml @@ -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