Skip to content

Commit 4e181ca

Browse files
[pre-commit.ci] pre-commit suggestions (#373)
* [pre-commit.ci] pre-commit suggestions updates: - [github.com/crate-ci/typos: v1.43.1 → v1](crate-ci/typos@v1.43.1...v1) - [github.com/astral-sh/ruff-pre-commit: v0.15.0 → v0.15.9](astral-sh/ruff-pre-commit@v0.15.0...v0.15.9) - [github.com/pre-commit/mirrors-mypy: v1.19.1 → v1.20.0](pre-commit/mirrors-mypy@v1.19.1...v1.20.0) - [github.com/tox-dev/pyproject-fmt: v2.12.1 → v2.21.0](tox-dev/pyproject-fmt@v2.12.1...v2.21.0) * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
1 parent c341073 commit 4e181ca

2 files changed

Lines changed: 38 additions & 53 deletions

File tree

.pre-commit-config.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ repos:
2323
- id: detect-private-key
2424

2525
- repo: https://github.com/crate-ci/typos
26-
rev: v1.43.1
26+
rev: v1
2727
hooks:
2828
- id: typos
2929
# empty to do not write fixes
@@ -55,7 +55,7 @@ repos:
5555
args: ["--print-width=79"]
5656

5757
- repo: https://github.com/astral-sh/ruff-pre-commit
58-
rev: v0.15.0
58+
rev: v0.15.9
5959
hooks:
6060
# use black formatting
6161
- id: ruff-format
@@ -67,13 +67,13 @@ repos:
6767

6868
# it needs to be after formatting hooks because the lines might be changed
6969
- repo: https://github.com/pre-commit/mirrors-mypy
70-
rev: v1.19.1
70+
rev: v1.20.0
7171
hooks:
7272
- id: mypy
7373
files: "src/.*"
7474

7575
- repo: https://github.com/tox-dev/pyproject-fmt
76-
rev: v2.12.1
76+
rev: v2.21.0
7777
hooks:
7878
- id: pyproject-fmt
7979
additional_dependencies: [tox]

pyproject.toml

Lines changed: 34 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
# === Metadata & Build System ===
2-
32
[build-system]
43
requires = [
54
"setuptools",
@@ -22,7 +21,7 @@ keywords = [
2221
]
2322
license = { file = "LICENSE" }
2423
authors = [
25-
{ name = "Shay Palachy Affek", email = 'shay.palachy@gmail.com' },
24+
{ name = "Shay Palachy Affek", email = "shay.palachy@gmail.com" },
2625
]
2726
requires-python = ">=3.10"
2827
classifiers = [
@@ -49,7 +48,6 @@ dependencies = [
4948
"pympler>=1",
5049
"watchdog>=2.3.1",
5150
]
52-
5351
optional-dependencies.all = [
5452
"boto3>=1.26",
5553
"pymongo>=4",
@@ -70,31 +68,24 @@ optional-dependencies.sql = [
7068
]
7169
urls.Source = "https://github.com/python-cachier/cachier"
7270
# --- setuptools ---
73-
7471
scripts.cachier = "cachier.__main__:cli"
7572

7673
[tool.setuptools]
7774
include-package-data = true
78-
79-
[tool.setuptools.dynamic]
80-
version = { attr = "cachier._version.__version__" }
81-
82-
[tool.setuptools.packages.find]
83-
where = [
75+
dynamic.version = { attr = "cachier._version.__version__" }
76+
packages.find.where = [
8477
"src",
85-
] # list of folders that contain the packages (["."] by default)
86-
include = [
78+
] # list of folders that contain the packages (["."] by default)
79+
packages.find.include = [
8780
"cachier*",
88-
] # package names should match these glob patterns (["*"] by default)
89-
namespaces = false # to disable scanning PEP 420 namespaces (true by default)
81+
] # package names should match these glob patterns (["*"] by default)
82+
packages.find.namespaces = false # to disable scanning PEP 420 namespaces (true by default)
9083

9184
# === Linting & Formatting ===
92-
9385
[tool.black]
9486
line-length = 120
9587

9688
# --- ruff ---
97-
9889
[tool.ruff]
9990
target-version = "py310"
10091
line-length = 120
@@ -113,12 +104,12 @@ lint.select = [
113104
"D", # see: https://pypi.org/project/pydocstyle
114105
"E",
115106
"F", # see: https://pypi.org/project/pyflakes
116-
"I", #see: https://pypi.org/project/isort/
107+
"I", # see: https://pypi.org/project/isort/
117108
"RUF100", # alternative to yesqa
118-
#"N", # see: https://pypi.org/project/pep8-naming
119-
"S", # see: https://pypi.org/project/flake8-bandit
109+
# "N", # see: https://pypi.org/project/pep8-naming
110+
"S", # see: https://pypi.org/project/flake8-bandit
120111
"SIM",
121-
"W", # see: https://pypi.org/project/pycodestyle
112+
"W", # see: https://pypi.org/project/pycodestyle
122113
]
123114
lint.extend-select = [
124115
"A", # see: https://pypi.org/project/flake8-builtins
@@ -156,13 +147,12 @@ lint.per-file-ignores."tests/**" = [
156147
lint.unfixable = [
157148
"F401",
158149
]
159-
160150
# --- flake8 ---
161-
#[tool.ruff.pydocstyle]
151+
# [tool.ruff.pydocstyle]
162152
## Use Google-style docstrings.
163-
#convention = "google"
164-
#[tool.ruff.pycodestyle]
165-
#ignore-overlong-task-comments = true
153+
# convention = "google"
154+
# [tool.ruff.pycodestyle]
155+
# ignore-overlong-task-comments = true
166156
# Unlike Flake8, default to a complexity level of 10.
167157
lint.mccabe.max-complexity = 10
168158

@@ -173,28 +163,26 @@ wrap-summaries = 120
173163
wrap-descriptions = 120
174164
blank = true
175165

166+
[tool.pytest]
176167
# === Testing ===
177-
178168
# --- pytest ---
179-
180-
[tool.pytest.ini_options]
181-
testpaths = [
169+
ini_options.testpaths = [
182170
"cachier",
183171
"tests",
184172
]
185-
norecursedirs = [
173+
ini_options.norecursedirs = [
186174
"dist",
187175
"build",
188176
]
189-
addopts = [
177+
ini_options.addopts = [
190178
"--color=yes",
191179
"-r a",
192180
"-v",
193181
"-s",
194182
"-W error",
195183
# Note: parallel execution is opt-in via -n/--numprocesses (pytest-xdist)
196184
]
197-
markers = [
185+
ini_options.markers = [
198186
"mongo: test the MongoDB core",
199187
"memory: test the memory core",
200188
"pickle: test the pickle core",
@@ -208,29 +196,26 @@ markers = [
208196
"seriallocal: local core tests that should run serially",
209197
]
210198

211-
[tool.coverage.report]
212-
show_missing = true
213-
# Regexes for lines to exclude from consideration
214-
exclude_lines = [
215-
"pragma: no cover", # Have to re-enable the standard pragma
216-
"raise NotImplementedError", # Don't complain if tests don't hit defensive assertion code:
217-
"if TYPE_CHECKING:", # Is only true when running mypy, not tests
218-
]
199+
[tool.coverage]
219200
# Parallel test execution configuration
220201
# Use: pytest -n auto (for automatic worker detection)
221202
# Or: pytest -n 4 (for specific number of workers)
222203
# Memory tests are safe to run in parallel by default
223204
# Pickle tests require isolation (handled by conftest.py fixture)
224-
225205
# --- coverage ---
226-
227-
[tool.coverage.run]
228-
branch = true
229-
parallel = true
206+
run.branch = true
230207
# dynamic_context = "test_function"
231-
omit = [
232-
"tests/*",
233-
"src/cachier/_version.py",
234-
"src/cachier/__init__.py",
208+
run.omit = [
235209
"**/scripts/**",
210+
"src/cachier/__init__.py",
211+
"src/cachier/_version.py",
212+
"tests/*",
213+
]
214+
run.parallel = true
215+
# Regexes for lines to exclude from consideration
216+
report.exclude_lines = [
217+
"if TYPE_CHECKING:", # Is only true when running mypy, not tests
218+
"pragma: no cover", # Have to re-enable the standard pragma
219+
"raise NotImplementedError", # Don't complain if tests don't hit defensive assertion code:
236220
]
221+
report.show_missing = true

0 commit comments

Comments
 (0)