diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index b2441e7b..0cd0ac39 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -269,6 +269,16 @@ repos: stages: [pre-commit] require_serial: true + - id: no-defaults + name: no-defaults + entry: uv run --extra=dev no-defaults + language: python + types_or: [python] + additional_dependencies: + - *uv_version + stages: [pre-commit] + require_serial: true + - id: doc8 name: doc8 entry: uv run --extra=dev -m doc8 diff --git a/pyproject.toml b/pyproject.toml index 14a1192f..0410a509 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -48,6 +48,7 @@ optional-dependencies.dev = [ "interrogate==1.7.0", "mypy[faster-cache]==2.3.0", "mypy-strict-kwargs==2026.7.19.1", + "no-defaults==1.0.1", "prek==0.4.11", "pydocstringformatter==1.0.0", "pydocstyle==6.3", @@ -151,6 +152,7 @@ lint.per-file-ignores."tests/*.py" = [ lint.unfixable = [ "ERA001", ] +lint.external = [ "NOD" ] lint.flake8-tidy-imports.banned-api."typing.cast".msg = "typing.cast is banned: use explicit type narrowing or a typed variable instead." lint.pydocstyle.convention = "google" @@ -438,3 +440,7 @@ ignore_path = [ [tool.yamlfix] section_whitelines = 1 whitelines = 1 + +[tool.no_defaults] +private_only = true +per_file_enforcement."tests/**" = "all"