Skip to content

Commit 3ec748e

Browse files
Merge pull request #2425 from VWS-Python/agent/add-no-defaults-linter
Add no-defaults linting
2 parents e4358e5 + 1c35e52 commit 3ec748e

3 files changed

Lines changed: 29 additions & 0 deletions

File tree

.pre-commit-config.yaml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -289,6 +289,16 @@ repos:
289289
stages: [pre-commit]
290290
require_serial: true
291291

292+
- id: no-defaults
293+
name: no-defaults
294+
entry: uv run --extra=dev no-defaults
295+
language: python
296+
types_or: [python]
297+
additional_dependencies:
298+
- *uv_version
299+
stages: [pre-commit]
300+
require_serial: true
301+
292302
- id: interrogate-docs
293303
name: interrogate docs
294304
entry: uv run --extra=dev doccmd --no-write-to-file --example-workers 0 --language=python

pyproject.toml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ optional-dependencies.dev = [
4949
"interrogate==1.7.0",
5050
"mypy[faster-cache]==2.3.0",
5151
"mypy-strict-kwargs==2026.7.19.1",
52+
"no-defaults==1.0.1",
5253
"prek==0.4.11",
5354
"pydocstringformatter==1.0.0",
5455
"pylint[spelling]==4.0.6",
@@ -171,6 +172,7 @@ lint.per-file-ignores."tests/test_*.py" = [
171172
lint.unfixable = [
172173
"ERA001",
173174
]
175+
lint.external = [ "NOD" ]
174176
lint.flake8-tidy-imports.banned-api."typing.cast".msg = "typing.cast is banned: use explicit type narrowing or a typed variable instead."
175177
lint.pydocstyle.convention = "google"
176178

@@ -461,3 +463,7 @@ ignore_path = [
461463
[tool.yamlfix]
462464
section_whitelines = 1
463465
whitelines = 1
466+
467+
[tool.no_defaults]
468+
private_only = true
469+
per_file_enforcement."tests/**" = "all"

uv.lock

Lines changed: 13 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)