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
3 changes: 2 additions & 1 deletion .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@
"ghcr.io/devcontainers/features/common-utils:2": {
"installZsh": true
},
"ghcr.io/devcontainers/features/git:1": {}
"ghcr.io/devcontainers/features/git:1": {},
"ghcr.io/devcontainers-community/features/mise:1": {}
},
"customizations": {
"vscode": {
Expand Down
3 changes: 3 additions & 0 deletions .devcontainer/postCreateCommand.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ set -euo pipefail

sudo chown -R vscode:vscode /workspace/.venv

echo "Running mise install..."
mise install

# Install/update PreK tool (idempotent)
echo "Ensuring prek installed (pinned via uv tool cache)..."
uv tool install prek >/dev/null 2>&1 || true
Expand Down
20 changes: 9 additions & 11 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -60,17 +60,6 @@ repos:
name: Ruff Formatter
args: ["--config=pyproject.toml"]

- repo: local
hooks:
- id: ty
name: ty check
entry: uv run ty check
language: system
types: [python]
files: ^python_template/
pass_filenames: false
args: ['python_template/', '--ignore', 'unresolved-import']

############################################################
# PUSH-TIME (SLOWER / ANALYSIS) HOOKS
# These run less frequently to keep commit loop fast.
Expand All @@ -85,6 +74,15 @@ repos:
always_run: true
stages: [pre-push, manual]
# Optional faster feedback: args: ["-q", "--maxfail=1"]
- id: ty
name: ty (type checker)
entry: uv run ty check
language: system
types: [python]
files: ^python_template/
pass_filenames: false
args: ['python_template/']
stages: [pre-push, manual]
- id: pylint
name: Pylint (design checks)
entry: uv run pylint
Expand Down
3 changes: 3 additions & 0 deletions mise.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[tools]
uv = "latest"
github-cli = "latest"
42 changes: 40 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ exclude = ["tests/*"]

[tool.ruff.lint]
extend-ignore = ["E203"]
select = ["E", "W", "D", "F", "UP", "B", "SIM","I"]
select = ["A", "B", "C4", "D", "E", "F", "I", "N", "PERF", "PT", "RUF", "SIM", "UP", "W"]

[tool.ruff.lint.per-file-ignores]
"__init__.py" = ["D104"]
Expand All @@ -58,7 +58,45 @@ convention = "google"

[tool.pylint]
max-line-length = 100
disable = ["E0401", "C0114", "R0903", "E0237","E1142","E0014","E1300","E0013","E1310","E1307","E2502","E6005","E6004","E0116","E0108","E0241","E1303","E0102","E0100","E0605","E0604","E0304","E0308","E2510","E2513","E2514","E2512","E2515","E0309","E0305","E0303","E1206","E1205","E0704","E1304","E1302","E4703","E0213","E0107","E0115","E0117","E0103","E0711","E0643","E0402","E1132","E0106","E0101","E0104","E1519","E1520","E0001","E1306","E1305","E0112","E1301","E0603","E0602","E0302","E0118","E1700","E0105","W1401","W0129","W0199","W3201","W1302","W1300","W1501","W0211","W0702","W0711","W1502","W0718","W0719","W0640","W0160","W0102","W0705","W0109","W1308","W0130","W1641","W0123","W0122","W0106","W1309","W0511","W1515","W1305","W1310","W0604","W0603","W0602","W1404","W0406","W1405","W1508","W1113","W1202","W1203","W1201","W0150","W1518","W0410","W1303","W0131","W0177","W3301","W2402","W0133","W0104","W0212","W0707","W0622","W2901","W1406","W0404","W0127","W1509","W1510","W0245","W0706","W0012","W0108","W0107","W0301","W1514","W0613","W1304","W1301","W0611","W0612","W0120","W2101","W2601","W0401","C0202","C0198","C1901","C0201","C0501","C0206","C0199","C0112","C0415","C2701","C0103","C0301","C2201","C0115","C0304","C0116","C0114","C0410","C0321","C2403","C2401","C0205","C0121","C0303","C0131","C0105","C0132","C0412","C0123","C3002","C2801","C3001","C0113","C0208","C0414","C0411","C0413","R0133","R0124","R6003","R1701","R6002","R6104","R1717","R1728","R1715","R1714","R1730","R1731","R1718","R1722","R1706","R1732","R5501","R2044","R1710","R0123","R2004","R0202","R1723","R1724","R1720","R1705","R6301","R0203","R0206","R1704","R1719","R1703","R1725","R1260","R0913","R0916","R0912","R0914","R1702","R0904","R0911","R0915","R1707","R1721","R1733","R1736","R1729","R1735","R1734","R6201","R0205","R0022","R1711"]
disable = ["all"]
enable = [
# cyclic imports and cross-file duplication
"R0401", # cyclic-import
"R0801", # duplicate-code

# inheritance / interface contract
"E0110", # abstract-class-instantiated
"E0202", # method-hidden
"W0221", # arguments-differ
"W0222", # signature-differs
"W0223", # abstract-method
"W0231", # super-init-not-called
"W0233", # non-parent-init-called
"W0236", # invalid-overridden-method
"W0237", # arguments-renamed
"W0239", # overridden-final-method
"W0240", # subclassed-final-class
"W0246", # useless-parent-delegation
"R0901", # too-many-ancestors

# cross-module type inference
"E1101", # no-member
"E0611", # no-name-in-module
"E1102", # not-callable
"E1111", # assignment-from-no-return
"E1120", # no-value-for-parameter
"E1121", # too-many-function-args
"E1123", # unexpected-keyword-arg
"E1124", # redundant-keyword-arg
"E1128", # assignment-from-none

# deprecated API usage across modules
"W4901", # deprecated-module
"W4902", # deprecated-method
"W4903", # deprecated-argument
"W4904", # deprecated-class
"W4905", # deprecated-decorator
]

[tool.deptry]
known_first_party = ["python_template"]
Expand Down
Loading
Loading