Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix python version check for typing import #210

Merged
merged 3 commits into from
Feb 3, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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