Skip to content

Commit

Permalink
Merge pull request #210 from baudsimVD/main
Browse files Browse the repository at this point in the history
fix python version check for typing import
  • Loading branch information
z3z1ma authored Feb 3, 2025
2 parents e182124 + cd57865 commit 0ce0e71
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 4 additions & 1 deletion src/dbt_osmosis/cli/main.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
# pyright: reportUnreachable=false, reportAny=false

from __future__ import annotations

import functools
import io
import subprocess
Expand Down Expand Up @@ -30,7 +33,7 @@
)

T = t.TypeVar("T")
if sys.version_info >= (3, 9):
if sys.version_info >= (3, 10):
P = t.ParamSpec("P")
else:
import typing_extensions as te
Expand Down
2 changes: 1 addition & 1 deletion src/dbt_osmosis/core/osmosis.py
Original file line number Diff line number Diff line change
Expand Up @@ -1096,7 +1096,7 @@ def _get_yaml_path_template(context: YamlRefactorContext, node: ResultNode) -> s
for k in ("dbt-osmosis", "dbt_osmosis")
for c in (node.config.extra, node.unrendered_config)
]
path_template = _find_first(t.cast(list[str | None], conf), lambda v: v is not None)
path_template = _find_first(t.cast(list[t.Union[str, None]], conf), lambda v: v is not None)
if not path_template:
raise MissingOsmosisConfig(
f"Config key `dbt-osmosis: <path>` not set for model {node.name}"
Expand Down

0 comments on commit 0ce0e71

Please sign in to comment.