Skip to content

Commit ed9b76d

Browse files
committed
Add no-defaults linting
1 parent cbf9129 commit ed9b76d

2 files changed

Lines changed: 11 additions & 0 deletions

File tree

.pre-commit-config.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -456,3 +456,9 @@ repos:
456456
types_or: [markdown, rst]
457457
additional_dependencies:
458458
- *uv_version
459+
460+
- repo: https://github.com/adamtheturtle/no-defaults
461+
rev: v1.0.0
462+
hooks:
463+
- id: no-defaults
464+
stages: [pre-commit]

pyproject.toml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,7 @@ lint.per-file-ignores."tests/*.py" = [
151151
lint.unfixable = [
152152
"ERA001",
153153
]
154+
lint.external = [ "NOD" ]
154155
lint.flake8-tidy-imports.banned-api."typing.cast".msg = "typing.cast is banned: use explicit type narrowing or a typed variable instead."
155156
lint.pydocstyle.convention = "google"
156157

@@ -438,3 +439,7 @@ ignore_path = [
438439
[tool.yamlfix]
439440
section_whitelines = 1
440441
whitelines = 1
442+
443+
[tool.no_defaults]
444+
private_only = true
445+
per_file_enforcement."tests/**" = "all"

0 commit comments

Comments
 (0)