Skip to content

Commit 3cb43cb

Browse files
Fight with Flake8 over raise types
1 parent 8bd000e commit 3cb43cb

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ target-version = "py310"
8080
docstring-code-format = true
8181

8282
[tool.ruff.lint]
83-
external = ["DOC401", "F824", "DOC101", "DOC103"] # used via flake8/pydoclint
83+
external = ["DOC401", "F824", "DOC101", "DOC103", "DOC503"] # used via flake8/pydoclint
8484
select = [
8585
"ANN", # type annotations (ensuring they are present, complements mypy)
8686
"ASYNC", # flake8 async rules

src/labthings_fastapi/server/config_model.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,11 @@ class ThingImportFailure(BaseException):
3030
"""Failed to import Thing. Raise with import traceback."""
3131

3232

33-
def contain_import_errors(value: Any, handler: ValidatorFunctionWrapHandler) -> Any:
33+
# Disabling DOC503 as it is incorrectly complaining that `exc.with_traceback` isn't
34+
# documentented.
35+
36+
37+
def contain_import_errors(value: Any, handler: ValidatorFunctionWrapHandler) -> Any: # noqa: DOC503
3438
"""Prevent errors during import from causing odd validation errors.
3539
3640
This is used to wrap the pydantic ImportString validator, and ensures that any

0 commit comments

Comments
 (0)