diff --git a/src/dbt_score/rules/generic.py b/src/dbt_score/rules/generic.py index 664f97f..0a0c6d8 100644 --- a/src/dbt_score/rules/generic.py +++ b/src/dbt_score/rules/generic.py @@ -1,8 +1,9 @@ """All generic rules.""" - from dbt_score.models import Model from dbt_score.rule import RuleViolation, rule +# mypy: disable-error-code="return" + @rule() def has_description(model: Model) -> RuleViolation | None: @@ -10,8 +11,6 @@ def has_description(model: Model) -> RuleViolation | None: if not model.description: return RuleViolation(message="Model lacks a description.") - return None - @rule() def columns_have_description(model: Model) -> RuleViolation | None: @@ -24,5 +23,3 @@ def columns_have_description(model: Model) -> RuleViolation | None: message=f"The following columns lack a description: " f"{', '.join(invalid_column_names)}." ) - - return None diff --git a/tests/conftest.py b/tests/conftest.py index ff6ee77..782c622 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -19,8 +19,9 @@ def pytest_sessionfinish(session: Session, exitstatus: int): def raw_manifest() -> Any: """Mock the raw manifest.""" return json.loads( - (Path(__file__).parent / "resources" / "manifest.json") - .read_text(encoding="utf-8") + (Path(__file__).parent / "resources" / "manifest.json").read_text( + encoding="utf-8" + ) )