Skip to content

Commit 77e3920

Browse files
committed
Merge branch 'main' into precommit
2 parents 07cd3ff + 2e6bdf6 commit 77e3920

File tree

3 files changed

+15
-7
lines changed

3 files changed

+15
-7
lines changed

.github/workflows/update-python.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ name: Update Python template version pins
22
on:
33
schedule:
44
- cron: '0 0 1 1,7 *'
5+
workflow_dispatch:
56

67
env:
78
PYTHON_TEMPLATE_LOCATION: "python/{{cookiecutter.project_slug}}"

python/{{cookiecutter.project_slug}}/.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ repos:
1212
- id: mixed-line-ending
1313
args: [ --fix=lf ]
1414
- repo: https://github.com/astral-sh/ruff-pre-commit
15-
rev: v0.5.0 # ruff version
15+
rev: v0.8.6 # ruff version
1616
hooks:
1717
- id: ruff-format
1818
- id: ruff

python/{{cookiecutter.project_slug}}/pyproject.toml

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ dynamic = ["version"]
2323

2424
[project.optional-dependencies]
2525
tests = ["pytest", "pytest-cov"]
26-
dev = ["pre-commit>=3.7.1", "ruff==0.5.0"]
26+
dev = ["pre-commit>=3.7.1", "ruff==0.8.6"]
2727
{% if cookiecutter.add_docs %}
2828
docs = [
2929
"sphinx==6.1.3",
@@ -92,10 +92,14 @@ select = [
9292
"RSE", # https://docs.astral.sh/ruff/rules/#flake8-raise-rse
9393
"RET", # https://docs.astral.sh/ruff/rules/#flake8-return-ret
9494
"SLF", # https://docs.astral.sh/ruff/rules/#flake8-self-slf
95+
"SLOT", # https://docs.astral.sh/ruff/rules/#flake8-slots-slot
9596
"SIM", # https://docs.astral.sh/ruff/rules/#flake8-simplify-sim
9697
"ARG", # https://docs.astral.sh/ruff/rules/#flake8-unused-arguments-arg
9798
"PTH", # https://docs.astral.sh/ruff/rules/#flake8-use-pathlib-pth
9899
"PGH", # https://docs.astral.sh/ruff/rules/#pygrep-hooks-pgh
100+
"PLC", # https://docs.astral.sh/ruff/rules/#convention-c
101+
"PLE", # https://docs.astral.sh/ruff/rules/#error-e_1
102+
"TRY", # https://docs.astral.sh/ruff/rules/#tryceratops-try
99103
"PERF", # https://docs.astral.sh/ruff/rules/#perflint-perf
100104
"FURB", # https://docs.astral.sh/ruff/rules/#refurb-furb
101105
"RUF", # https://docs.astral.sh/ruff/rules/#ruff-specific-rules-ruf
@@ -114,13 +118,14 @@ fixable = [
114118
"PT",
115119
"RSE",
116120
"SIM",
121+
"PLC",
122+
"PLE",
123+
"TRY",
117124
"PERF",
118125
"FURB",
119126
"RUF"
120127
]
121128
# ANN003 - missing-type-kwargs
122-
# ANN101 - missing-type-self
123-
# ANN102 - missing-type-cls
124129
# D203 - one-blank-line-before-class
125130
# D205 - blank-line-after-summary
126131
# D206 - indent-with-spaces*
@@ -134,30 +139,32 @@ fixable = [
134139
# E501 - line-too-long*
135140
# W191 - tab-indentation*
136141
# S321 - suspicious-ftp-lib-usage
142+
# PLC0206 - dict-index-missing-items
137143
# *ignored for compatibility with formatter
138144
ignore = [
139-
"ANN003", "ANN101", "ANN102",
145+
"ANN003",
140146
"D203", "D205", "D206", "D213", "D300", "D400", "D415",
141147
"E111", "E114", "E117", "E501",
142148
"W191",
143149
"S321",
150+
"PLC0206",
144151
]
145152

146153
[tool.ruff.lint.per-file-ignores]
147154
# ANN001 - missing-type-function-argument
148155
# ANN2 - missing-return-type
149-
# ANN102 - missing-type-cls
150156
# D100 - undocumented-public-module
151157
# D102 - undocumented-public-class
158+
# D103 - undocumented-public-function
152159
# S101 - assert
153160
# B011 - assert-false
154161
# INP001 - implicit-namespace-package
155162
"tests/*" = [
156163
"ANN001",
157164
"ANN2",
158-
"ANN102",
159165
"D100",
160166
"D102",
167+
"D103",
161168
"S101",
162169
"B011",
163170
"INP001"

0 commit comments

Comments
 (0)