Skip to content

Commit 81adacf

Browse files
committed
2025-12-16 16:41:14 (Tue) > DW-Mac > derekwan
1 parent 8780780 commit 81adacf

File tree

6 files changed

+180
-49
lines changed

6 files changed

+180
-49
lines changed

.github/workflows/push--tag.yaml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
jobs:
2+
tag:
3+
runs-on: ubuntu-latest
4+
steps:
5+
- name: Tag latest commit
6+
uses: dycw/action-tag-commit@latest
7+
with:
8+
token: ${{ secrets.GITHUB_TOKEN }}
9+
name: push
10+
"on":
11+
push:
12+
branches:
13+
- master

.pre-commit-config.yaml

Lines changed: 62 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -1,61 +1,75 @@
11
repos:
2-
# fixers
3-
- repo: https://github.com/astral-sh/ruff-pre-commit
4-
rev: v0.14.9
5-
hooks:
6-
- id: ruff-check
7-
args: [--fix]
2+
- hooks:
3+
- args:
4+
- --fix
5+
id: ruff-check
86
- id: ruff-format
9-
- repo: https://github.com/astral-sh/uv-pre-commit
10-
rev: 0.9.17
11-
hooks:
12-
- id: uv-lock
13-
args: [--upgrade]
14-
- repo: https://github.com/compwa/taplo-pre-commit
7+
repo: https://github.com/astral-sh/ruff-pre-commit
8+
rev: v0.14.9
9+
- hooks:
10+
- args:
11+
- --option
12+
- indent_tables=true
13+
- --option
14+
- indent_entries=true
15+
- --option
16+
- reorder_keys=true
17+
id: taplo-format
18+
repo: https://github.com/compwa/taplo-pre-commit
1519
rev: v0.9.3
16-
hooks:
17-
- id: taplo-format
18-
args:
19-
[
20-
--option,
21-
indent_tables=true,
22-
--option,
23-
indent_entries=true,
24-
--option,
25-
reorder_keys=true,
26-
]
27-
- repo: https://github.com/dycw/pre-commit-hooks
28-
rev: 0.13.26
29-
hooks:
20+
- hooks:
21+
- args:
22+
- --github--push-tag
23+
- --pre-commit--prettier
24+
- --pre-commit--ruff
25+
- --pre-commit--taplo
26+
- --pre-commit--uv
27+
- --pyproject
28+
- --pyproject--project--name=template
29+
- --pyright
30+
- --pyright-include=script.py
31+
- --pytest
32+
- --pytest-test-paths=tests
33+
- --ruff
34+
id: nitpick
35+
repo: https://github.com/dycw/pre-commit-hook-nitpick
36+
rev: 0.2.5
37+
- hooks:
3038
- id: format-requirements
3139
- id: replace-sequence-str
32-
- id: run-bump-my-version
33-
- repo: https://github.com/scop/pre-commit-shfmt
34-
rev: v3.12.0-2
35-
hooks:
36-
- id: shfmt
37-
# linters
38-
- repo: https://github.com/andreoliwa/nitpick
39-
rev: v0.38.1
40-
hooks:
41-
- id: nitpick-check
42-
- repo: https://github.com/shellcheck-py/shellcheck-py
43-
rev: v0.11.0.1
44-
hooks:
45-
- id: shellcheck
46-
# fixers/linters
47-
- repo: https://github.com/pre-commit/pre-commit-hooks
48-
rev: v6.0.0
49-
hooks:
40+
repo: https://github.com/dycw/pre-commit-hooks
41+
rev: 0.13.26
42+
- hooks:
5043
- id: check-executables-have-shebangs
5144
- id: check-merge-conflict
5245
- id: check-symlinks
5346
- id: destroyed-symlinks
5447
- id: detect-private-key
5548
- id: end-of-file-fixer
56-
- id: mixed-line-ending
57-
args: [--fix=lf]
49+
- args:
50+
- --fix=lf
51+
id: mixed-line-ending
5852
- id: no-commit-to-branch
59-
- id: pretty-format-json
60-
args: [--autofix]
53+
- args:
54+
- --autofix
55+
id: pretty-format-json
6156
- id: trailing-whitespace
57+
repo: https://github.com/pre-commit/pre-commit-hooks
58+
rev: v6.0.0
59+
- hooks:
60+
- entry: npx prettier --write
61+
id: prettier
62+
language: system
63+
name: prettier
64+
types_or:
65+
- markdown
66+
- yaml
67+
repo: local
68+
- hooks:
69+
- args:
70+
- --script=script.py
71+
- --upgrade
72+
files: ^script\.py$
73+
id: uv-lock
74+
repo: https://github.com/astral-sh/uv-pre-commit
75+
rev: 0.9.17

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
[project]
99
authors = [{ email = "d.wan@icloud.com", name = "Derek Wan" }]
1010
dependencies = []
11-
name = "dycw-template"
11+
name = "template"
1212
readme = "README.md"
1313
requires-python = ">= 3.14"
1414
version = "0.1.0"

pyrightconfig.json

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
{
2+
"deprecateTypingAliases": true,
3+
"enableReachabilityAnalysis": false,
4+
"include": [
5+
"script.py"
6+
],
7+
"pythonVersion": "3.14",
8+
"reportCallInDefaultInitializer": true,
9+
"reportImplicitOverride": true,
10+
"reportImplicitStringConcatenation": true,
11+
"reportImportCycles": true,
12+
"reportMissingSuperCall": true,
13+
"reportMissingTypeArgument": false,
14+
"reportMissingTypeStubs": false,
15+
"reportPrivateImportUsage": false,
16+
"reportPrivateUsage": false,
17+
"reportPropertyTypeMismatch": true,
18+
"reportUninitializedInstanceVariable": true,
19+
"reportUnknownArgumentType": false,
20+
"reportUnknownMemberType": false,
21+
"reportUnknownParameterType": false,
22+
"reportUnknownVariableType": false,
23+
"reportUnnecessaryComparison": false,
24+
"reportUnnecessaryTypeIgnoreComment": true,
25+
"reportUnusedCallResult": true,
26+
"reportUnusedImport": false,
27+
"reportUnusedVariable": false,
28+
"typeCheckingMode": "strict"
29+
}

pytest.toml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
[pytest]
2+
addopts = [
3+
"-ra",
4+
"-vv",
5+
"--color=auto",
6+
"--durations=10",
7+
"--durations-min=10",
8+
]
9+
collect_imported_tests = false
10+
empty_parameter_set_mark = "fail_at_collect"
11+
filterwarnings = ["error"]
12+
minversion = "9.0"
13+
strict = true
14+
testpaths = ["tests"]
15+
xfail_strict = true

ruff.toml

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
target-version = "py314"
2+
unsafe-fixes = true
3+
4+
[format]
5+
preview = true
6+
skip-magic-trailing-comma = true
7+
8+
[lint]
9+
explicit-preview-rules = true
10+
fixable = ["ALL"]
11+
ignore = [
12+
"ANN401",
13+
"ASYNC109",
14+
"C901",
15+
"CPY",
16+
"D",
17+
"E501",
18+
"PD",
19+
"PERF203",
20+
"PLC0415",
21+
"PLE1205",
22+
"PLR0904",
23+
"PLR0911",
24+
"PLR0912",
25+
"PLR0913",
26+
"PLR0915",
27+
"PLR2004",
28+
"PT012",
29+
"PT013",
30+
"PYI041",
31+
"S202",
32+
"S310",
33+
"S311",
34+
"S602",
35+
"S603",
36+
"S607",
37+
"W191",
38+
"E111",
39+
"E114",
40+
"E117",
41+
"COM812",
42+
"COM819",
43+
"ISC001",
44+
"ISC002",
45+
]
46+
preview = true
47+
select = ["ALL", "RUF022", "RUF029"]
48+
49+
[lint.extend-per-file-ignores]
50+
"test_*.py" = ["S101", "SLF001"]
51+
52+
[lint.flake8-bugbear]
53+
extend-immutable-calls = ["typing.cast"]
54+
55+
[lint.flake8-tidy-imports]
56+
ban-relative-imports = "all"
57+
58+
[lint.isort]
59+
required-imports = ["from __future__ import annotations"]
60+
split-on-trailing-comma = false

0 commit comments

Comments
 (0)