Skip to content

Commit a4f04cc

Browse files
[pre-commit.ci] pre-commit autoupdate (#253)
<!--pre-commit.ci start--> updates: - [github.com/tox-dev/pyproject-fmt: 1.8.0 → 2.1.1](tox-dev/pyproject-fmt@1.8.0...2.1.1) - [github.com/astral-sh/ruff-pre-commit: v0.4.3 → v0.4.4](astral-sh/ruff-pre-commit@v0.4.3...v0.4.4) <!--pre-commit.ci end--> --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
1 parent c817dc7 commit a4f04cc

File tree

2 files changed

+118
-58
lines changed

2 files changed

+118
-58
lines changed

.pre-commit-config.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,12 +36,12 @@ repos:
3636
)
3737
3838
- repo: https://github.com/tox-dev/pyproject-fmt
39-
rev: 1.8.0
39+
rev: 2.1.1
4040
hooks:
4141
- id: pyproject-fmt
4242

4343
- repo: https://github.com/astral-sh/ruff-pre-commit
44-
rev: v0.4.3
44+
rev: v0.4.4
4545
hooks:
4646
- id: ruff
4747

pyproject.toml

Lines changed: 116 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ keywords = [
1717
]
1818
license = "BSD-3-Clause"
1919
authors = [
20-
{ name = "Alexander Piskun", email = "bigcat88@icloud.com" },
20+
{ name = "Alexander Piskun", email = "bigcat88@icloud.com" },
2121
]
2222
requires-python = ">=3.10"
2323
classifiers = [
@@ -50,140 +50,200 @@ dependencies = [
5050
"python-dotenv>=1",
5151
"xmltodict>=0.13",
5252
]
53-
[project.optional-dependencies]
54-
app = [
53+
optional-dependencies.app = [
5554
"uvicorn[standard]>=0.23.2",
5655
]
57-
bench = [
56+
optional-dependencies.bench = [
5857
"matplotlib",
59-
"nc_py_api[app]",
58+
"nc-py-api[app]",
6059
"numpy",
6160
"py-cpuinfo",
6261
]
63-
calendar = [
62+
optional-dependencies.calendar = [
6463
"caldav==1.3.6",
6564
]
66-
dev = [
67-
"nc_py_api[bench,calendar,dev-min]",
65+
optional-dependencies.dev = [
66+
"nc-py-api[bench,calendar,dev-min]",
6867
]
69-
dev-min = [
68+
optional-dependencies.dev-min = [
7069
"coverage",
71-
"huggingface_hub",
70+
"huggingface-hub",
7271
"pillow",
7372
"pre-commit",
7473
"pylint",
7574
"pytest",
7675
"pytest-asyncio",
7776
]
78-
docs = [
79-
"autodoc_pydantic>=2.0.1",
80-
"nc_py_api[app,calendar]",
77+
optional-dependencies.docs = [
78+
"autodoc-pydantic>=2.0.1",
79+
"nc-py-api[app,calendar]",
8180
"sphinx>=6.2",
8281
"sphinx-copybutton",
8382
"sphinx-inline-tabs",
8483
"sphinx-issues>=3.0.1",
8584
"sphinx-rtd-theme>=1",
8685
]
87-
[project.urls]
88-
Changelog = "https://github.com/cloud-py-api/nc_py_api/blob/main/CHANGELOG.md"
89-
Documentation = "https://cloud-py-api.github.io/nc_py_api/"
90-
Source = "https://github.com/cloud-py-api/nc_py_api"
86+
urls.Changelog = "https://github.com/cloud-py-api/nc_py_api/blob/main/CHANGELOG.md"
87+
urls.Documentation = "https://cloud-py-api.github.io/nc_py_api/"
88+
urls.Source = "https://github.com/cloud-py-api/nc_py_api"
9189

9290
[tool.hatch.version]
9391
path = "nc_py_api/_version.py"
9492

9593
[tool.hatch.build.targets.sdist]
9694
include = [
97-
"/nc_py_api",
98-
"/CHANGELOG.md",
99-
"/README.md",
95+
"/nc_py_api",
96+
"/CHANGELOG.md",
97+
"/README.md",
10098
]
10199
exclude = [
102-
"Makefile",
100+
"Makefile",
103101
]
104102

105103
[tool.black]
106104
line-length = 120
107-
target-versions = ["py310"]
105+
target-versions = [
106+
"py310",
107+
]
108108
preview = true
109109

110110
[tool.ruff]
111-
line-length = 120
112111
target-version = "py310"
113-
lint.select = ["A", "B", "C", "D", "E", "F", "G", "I", "S", "SIM", "PIE", "Q", "RET", "RUF", "UP" , "W"]
114-
lint.extend-ignore = ["D107", "D105", "D203", "D213", "D401", "I001", "RUF100"]
115-
116-
[tool.ruff.lint.per-file-ignores]
117-
"nc_py_api/__init__.py" = ["F401"]
118-
"nc_py_api/ex_app/__init__.py" = ["F401"]
119-
120-
[tool.ruff.lint.extend-per-file-ignores]
121-
"benchmarks/**/*.py" = ["D", "SIM", "S311"]
122-
"docs/**/*.py" = ["D"]
123-
"examples/**/*.py" = ["D", "S106", "S311"]
124-
"tests/**/*.py" = ["D", "E402", "S", "UP"]
112+
line-length = 120
113+
lint.select = [
114+
"A",
115+
"B",
116+
"C",
117+
"D",
118+
"E",
119+
"F",
120+
"G",
121+
"I",
122+
"PIE",
123+
"Q",
124+
"RET",
125+
"RUF",
126+
"S",
127+
"SIM",
128+
"UP",
129+
"W",
130+
]
131+
lint.extend-ignore = [
132+
"D105",
133+
"D107",
134+
"D203",
135+
"D213",
136+
"D401",
137+
"I001",
138+
"RUF100",
139+
]
125140

126-
[tool.ruff.lint.mccabe]
127-
max-complexity = 16
141+
lint.per-file-ignores."nc_py_api/__init__.py" = [
142+
"F401",
143+
]
144+
lint.per-file-ignores."nc_py_api/ex_app/__init__.py" = [
145+
"F401",
146+
]
147+
lint.extend-per-file-ignores."benchmarks/**/*.py" = [
148+
"D",
149+
"S311",
150+
"SIM",
151+
]
152+
lint.extend-per-file-ignores."docs/**/*.py" = [
153+
"D",
154+
]
155+
lint.extend-per-file-ignores."examples/**/*.py" = [
156+
"D",
157+
"S106",
158+
"S311",
159+
]
160+
lint.extend-per-file-ignores."tests/**/*.py" = [
161+
"D",
162+
"E402",
163+
"S",
164+
"UP",
165+
]
166+
lint.mccabe.max-complexity = 16
128167

129168
[tool.isort]
130169
profile = "black"
131170

132171
[tool.pylint]
133172
master.py-version = "3.10"
134-
master.extension-pkg-allow-list = ["pydantic"]
173+
master.extension-pkg-allow-list = [
174+
"pydantic",
175+
]
135176
design.max-attributes = 8
136177
design.max-locals = 20
137178
design.max-branches = 16
138179
design.max-returns = 8
139180
design.max-args = 8
140181
basic.good-names = [
141-
"a", "b", "c", "d", "e", "f", "i", "j", "k", "r", "v",
142-
"ex", "_", "fp", "im", "nc", "ui",
182+
"a",
183+
"b",
184+
"c",
185+
"d",
186+
"e",
187+
"f",
188+
"i",
189+
"j",
190+
"k",
191+
"r",
192+
"v",
193+
"ex",
194+
"_",
195+
"fp",
196+
"im",
197+
"nc",
198+
"ui",
143199
]
144200
reports.output-format = "colorized"
145201
similarities.ignore-imports = "yes"
146202
similarities.min-similarity-lines = 10
147203
messages_control.disable = [
148-
"missing-class-docstring",
149-
"missing-function-docstring",
150-
"line-too-long",
151-
"too-few-public-methods",
152-
"too-many-public-methods",
204+
"missing-class-docstring",
205+
"missing-function-docstring",
206+
"line-too-long",
207+
"too-few-public-methods",
208+
"too-many-public-methods",
153209
]
154210

155211
[tool.pytest.ini_options]
156212
minversion = "6.0"
157213
testpaths = [
158-
"tests",
214+
"tests",
159215
]
160216
filterwarnings = [
161-
"ignore::DeprecationWarning",
217+
"ignore::DeprecationWarning",
162218
]
163219
log_cli = true
164220
addopts = "-rs --color=yes"
165221
markers = [
166-
"require_nc: marks a test that requires a minimum version of Nextcloud.",
222+
"require_nc: marks a test that requires a minimum version of Nextcloud.",
167223
]
168224
asyncio_mode = "auto"
169225

170226
[tool.coverage.run]
171227
cover_pylib = true
172-
include = ["*/nc_py_api/*"]
173-
omit = ["*/tests/*"]
228+
include = [
229+
"*/nc_py_api/*",
230+
]
231+
omit = [
232+
"*/tests/*",
233+
]
174234

175235
[tool.coverage.paths]
176236
source = [
177-
"nc_py_api/",
178-
"*/site-packages/nc_py_api/"
237+
"nc_py_api/",
238+
"*/site-packages/nc_py_api/",
179239
]
180240

181241
[tool.coverage.report]
182242
exclude_lines = [
183-
"pragma: no cover",
184-
"raise NotImplementedError",
185-
"DeprecationWarning",
186-
"DEPRECATED"
243+
"pragma: no cover",
244+
"raise NotImplementedError",
245+
"DeprecationWarning",
246+
"DEPRECATED",
187247
]
188248

189249
[tool.mypy]

0 commit comments

Comments
 (0)