Skip to content

Commit

Permalink
Merge branch 'master' into jvandooren/rule-configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
jochemvandooren authored May 1, 2024
2 parents 3622da3 + fffb83e commit 58b15b4
Show file tree
Hide file tree
Showing 7 changed files with 12 additions and 14 deletions.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -55,13 +55,13 @@ dbt-score = {call = "dbt_score.cli:cli"}

[tool.mypy]
strict = true
warn_no_return = false

[[tool.mypy.overrides]]
module = "tests.*"
disallow_untyped_defs = false
disallow_incomplete_defs = false
disallow_untyped_calls = false
warn_no_return = false

### Ruff ###

Expand Down
5 changes: 5 additions & 0 deletions src/dbt_score/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1,6 @@
"""Init dbt_score package."""

from dbt_score.models import Model
from dbt_score.rule import Rule, RuleViolation, Severity, rule

__all__ = ["Model", "Rule", "RuleViolation", "Severity", "rule"]
5 changes: 1 addition & 4 deletions src/dbt_score/rules/generic.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
"""All generic rules."""

from dbt_score.models import Model
from dbt_score.rule import RuleViolation, rule

# mypy: disable-error-code="return"
from dbt_score import Model, RuleViolation, rule


@rule
Expand Down
3 changes: 1 addition & 2 deletions tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@
from typing import Any, Type

from dbt_score.config_parser import DbtScoreConfig, RuleConfig
from dbt_score.models import Model
from dbt_score.rule import Rule, RuleViolation, Severity, rule
from dbt_score import Model, Rule, RuleViolation, Severity, rule
from pytest import fixture

# Configuration
Expand Down
3 changes: 1 addition & 2 deletions tests/rules/example.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
"""Example rules."""

from dbt_score.models import Model
from dbt_score.rule import RuleViolation, rule
from dbt_score import Model, RuleViolation, rule


@rule()
Expand Down
5 changes: 2 additions & 3 deletions tests/rules/nested/example.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
"""Example rules."""

from dbt_score.models import Model
from dbt_score.rule import RuleViolation, rule
from dbt_score import Model, RuleViolation, rule


@rule()
@rule
def rule_test_nested_example(model: Model) -> RuleViolation | None:
"""An example rule."""
3 changes: 1 addition & 2 deletions tests/test_rule.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
"""Test rule."""

import pytest
from dbt_score.models import Model
from dbt_score.rule import Rule, RuleViolation, Severity, rule
from dbt_score import Model, Rule, RuleViolation, Severity, rule


def test_rule_decorator_and_class(
Expand Down

0 comments on commit 58b15b4

Please sign in to comment.