Skip to content

Commit 7ed28d4

Browse files
Merge pull request #3124 from VWS-Python/agent/add-no-defaults-linter
Add no-defaults linting
2 parents 9858f65 + 4c3d1eb commit 7ed28d4

2 files changed

Lines changed: 16 additions & 0 deletions

File tree

.pre-commit-config.yaml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -269,6 +269,16 @@ repos:
269269
stages: [pre-commit]
270270
require_serial: true
271271

272+
- id: no-defaults
273+
name: no-defaults
274+
entry: uv run --extra=dev no-defaults
275+
language: python
276+
types_or: [python]
277+
additional_dependencies:
278+
- *uv_version
279+
stages: [pre-commit]
280+
require_serial: true
281+
272282
- id: doc8
273283
name: doc8
274284
entry: uv run --extra=dev -m doc8

pyproject.toml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ optional-dependencies.dev = [
4848
"interrogate==1.7.0",
4949
"mypy[faster-cache]==2.3.0",
5050
"mypy-strict-kwargs==2026.7.19.1",
51+
"no-defaults==1.0.1",
5152
"prek==0.4.11",
5253
"pydocstringformatter==1.0.0",
5354
"pydocstyle==6.3",
@@ -151,6 +152,7 @@ lint.per-file-ignores."tests/*.py" = [
151152
lint.unfixable = [
152153
"ERA001",
153154
]
155+
lint.external = [ "NOD" ]
154156
lint.flake8-tidy-imports.banned-api."typing.cast".msg = "typing.cast is banned: use explicit type narrowing or a typed variable instead."
155157
lint.pydocstyle.convention = "google"
156158

@@ -438,3 +440,7 @@ ignore_path = [
438440
[tool.yamlfix]
439441
section_whitelines = 1
440442
whitelines = 1
443+
444+
[tool.no_defaults]
445+
private_only = true
446+
per_file_enforcement."tests/**" = "all"

0 commit comments

Comments
 (0)