Skip to content

Commit b4b4a57

Browse files
Add dbt-core as dev dependency and drop MultiOption selection
1 parent a48823d commit b4b4a57

File tree

4 files changed

+3
-9
lines changed

4 files changed

+3
-9
lines changed

pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ dbt-score = "dbt_score.__main__:main"
3636
[tool.pdm]
3737
[tool.pdm.dev-dependencies]
3838
dev = [
39+
"dbt-core>=1.5",
3940
"tox-pdm~=0.7.2",
4041
"tox~=4.13",
4142
]

src/dbt_score/cli.py

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,8 @@
99
from click.core import ParameterSource
1010

1111
from dbt_score.config import Config
12-
from dbt_score.dbt_utils import ( # type: ignore[attr-defined]
13-
DBT_INSTALLED,
12+
from dbt_score.dbt_utils import (
1413
DbtParseException,
15-
MultiOption,
1614
dbt_parse,
1715
get_default_manifest_path,
1816
)
@@ -53,10 +51,7 @@ def cli() -> None:
5351
"--select",
5452
"-s",
5553
help="Specify the nodes to include.",
56-
cls=MultiOption if DBT_INSTALLED else None,
57-
type=tuple,
5854
multiple=True,
59-
hidden=not DBT_INSTALLED, # Only include if dbt is installed
6055
)
6156
@click.option(
6257
"--namespace",

src/dbt_score/dbt_utils.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,8 @@
99
try:
1010
DBT_INSTALLED = True
1111
from dbt.cli.main import dbtRunner, dbtRunnerResult # type: ignore
12-
from dbt.cli.options import MultiOption # type: ignore
1312
except ImportError:
1413
DBT_INSTALLED = False
15-
MultiOption = None
1614

1715

1816
class DbtNotInstalledException(Exception):

tests/test_cli.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ def test_lint_dbt_not_installed(caplog, manifest_path):
6363
"""Test lint with a valid manifest when dbt is not installed."""
6464
runner = CliRunner()
6565

66-
with patch("dbt_score.cli.DBT_INSTALLED", new=False):
66+
with patch("dbt_score.dbt_utils.DBT_INSTALLED", new=False):
6767
result = runner.invoke(lint, ["-m", manifest_path], catch_exceptions=False)
6868
assert result.exit_code == 0
6969

0 commit comments

Comments
 (0)