Update template config: pylint in pyproject, just test args, python 3.12.4 pin
This commit is contained in:
@@ -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
|
||||
@@ -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.
|
||||
|
||||
@@ -13,4 +13,4 @@ isort = "*"
|
||||
autoflake = "*"
|
||||
|
||||
[requires]
|
||||
python_version = "3.12"
|
||||
python_version = "3.12.4"
|
||||
|
||||
Generated
+2
-2
@@ -1,11 +1,11 @@
|
||||
{
|
||||
"_meta": {
|
||||
"hash": {
|
||||
"sha256": "30532cdf88c6215bc2d5cbe27951c9a3e483aa03c0ecad0b8b2bf3533d5226b5"
|
||||
"sha256": "7731c495ee4dde25bb5144bb8ec56c2ebfe3914baac63845a94c1d55a9363102"
|
||||
},
|
||||
"pipfile-spec": 6,
|
||||
"requires": {
|
||||
"python_version": "3.12"
|
||||
"python_version": "3.12.4"
|
||||
},
|
||||
"sources": [
|
||||
{
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
@@ -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
@@ -13,4 +13,4 @@ isort = "*"
|
||||
autoflake = "*"
|
||||
|
||||
[requires]
|
||||
python_version = "3.12"
|
||||
python_version = "{{PYVER}}"
|
||||
|
||||
+4
-4
@@ -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
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user