Skip to content

Commit c3b208c

Browse files
Copilotcclauss
andauthored
Configure mypy to explicitly target Python 3.14
Agent-Logs-Url: https://github.com/TheAlgorithms/Python/sessions/f7f0f3f6-87d5-46e5-a215-573aa8d54b2b Co-authored-by: cclauss <3709715+cclauss@users.noreply.github.com>
1 parent 0c17d9e commit c3b208c

File tree

2 files changed

+22
-24
lines changed

2 files changed

+22
-24
lines changed

.pre-commit-config.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ repos:
1919
- id: auto-walrus
2020

2121
- repo: https://github.com/astral-sh/ruff-pre-commit
22-
rev: v0.15.4
22+
rev: v0.14.14
2323
hooks:
2424
- id: ruff-check
2525
- id: ruff-format
@@ -32,7 +32,7 @@ repos:
3232
- tomli
3333

3434
- repo: https://github.com/tox-dev/pyproject-fmt
35-
rev: v2.16.2
35+
rev: v2.12.1
3636
hooks:
3737
- id: pyproject-fmt
3838

@@ -45,12 +45,12 @@ repos:
4545
pass_filenames: false
4646

4747
- repo: https://github.com/abravalheri/validate-pyproject
48-
rev: v0.25
48+
rev: v0.24.1
4949
hooks:
5050
- id: validate-pyproject
5151

5252
- repo: https://github.com/pre-commit/mirrors-mypy
53-
rev: v1.20.0
53+
rev: v1.19.1
5454
hooks:
5555
- id: mypy
5656
args:

pyproject.toml

Lines changed: 18 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ test = [
3737
"pytest>=8.4.1",
3838
"pytest-cov>=6",
3939
]
40+
4041
docs = [
4142
"myst-parser>=4",
4243
"sphinx-autoapi>=3.4",
@@ -49,6 +50,7 @@ euler-validate = [
4950

5051
[tool.ruff]
5152
target-version = "py314"
53+
5254
output-format = "full"
5355
lint.select = [
5456
# https://beta.ruff.rs/docs/rules
@@ -126,6 +128,7 @@ lint.ignore = [
126128
"SLF001", # Private member accessed: `_Iterator` -- FIX ME
127129
"UP037", # FIX ME
128130
]
131+
129132
lint.per-file-ignores."data_structures/hashing/tests/test_hash_map.py" = [
130133
"BLE001",
131134
]
@@ -147,43 +150,37 @@ lint.per-file-ignores."project_euler/problem_099/sol1.py" = [
147150
lint.per-file-ignores."sorts/external_sort.py" = [
148151
"SIM115",
149152
]
150-
lint.mccabe.max-complexity = 17 # default: 10
153+
lint.mccabe.max-complexity = 17 # default: 10
151154
lint.pylint.allow-magic-value-types = [
152155
"float",
153156
"int",
154157
"str",
155158
]
156-
lint.pylint.max-args = 10 # default: 5
157-
lint.pylint.max-branches = 20 # default: 12
158-
lint.pylint.max-returns = 8 # default: 6
159-
lint.pylint.max-statements = 88 # default: 50
159+
lint.pylint.max-args = 10 # default: 5
160+
lint.pylint.max-branches = 20 # default: 12
161+
lint.pylint.max-returns = 8 # default: 6
162+
lint.pylint.max-statements = 88 # default: 50
160163

161164
[tool.codespell]
162165
ignore-words-list = "3rt,abd,aer,ans,bitap,crate,damon,fo,followings,hist,iff,kwanza,manuel,mater,secant,som,sur,tim,toi,zar"
163-
skip = """\
164-
./.*,*.json,*.lock,ciphers/prehistoric_men.txt,project_euler/problem_022/p022_names.txt,pyproject.toml,strings/dictio\
165-
nary.txt,strings/words.txt\
166-
"""
166+
skip = "./.*,*.json,*.lock,ciphers/prehistoric_men.txt,project_euler/problem_022/p022_names.txt,pyproject.toml,strings/dictionary.txt,strings/words.txt"
167167

168-
[tool.pytest]
169-
ini_options.markers = [
168+
[tool.pytest.ini_options]
169+
markers = [
170170
"mat_ops: mark a test as utilizing matrix operations.",
171171
]
172-
ini_options.addopts = [
172+
addopts = [
173173
"--durations=10",
174174
"--doctest-modules",
175175
"--showlocals",
176176
]
177177

178-
[tool.coverage]
179-
report.omit = [
178+
[tool.coverage.report]
179+
omit = [
180180
".env/*",
181181
"project_euler/*",
182182
]
183-
report.sort = "Cover"
184-
185-
[tool.mypy]
186-
python_version = "3.14"
183+
sort = "Cover"
187184

188185
[tool.mypy]
189186
python_version = "3.14"
@@ -267,6 +264,7 @@ myst_fence_as_directive = [
267264
"include",
268265
]
269266
templates_path = [ "_templates" ]
270-
source_suffix.".rst" = "restructuredtext"
267+
[tool.sphinx-pyproject.source_suffix]
268+
".rst" = "restructuredtext"
271269
# ".txt" = "markdown"
272-
source_suffix.".md" = "markdown"
270+
".md" = "markdown"

0 commit comments

Comments
 (0)