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

[TIDY FIRST] Fix core/dbt/version.py type hinting #10613

Merged
merged 2 commits into from
Aug 27, 2024
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
6 changes: 6 additions & 0 deletions .changes/unreleased/Under the Hood-20240827-105014.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
kind: Under the Hood
body: Additional type hints for `core/dbt/version.py`
time: 2024-08-27T10:50:14.047859-05:00
custom:
Author: QMalcolm
Issue: "10612"
7 changes: 5 additions & 2 deletions core/dbt/version.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,10 @@ def get_latest_version(
return semver.VersionSpecifier.from_version_string(version_string)


def _get_core_msg_lines(installed, latest) -> Tuple[List[List[str]], str]:
def _get_core_msg_lines(
installed: semver.VersionSpecifier,
latest: Optional[semver.VersionSpecifier],
) -> Tuple[List[List[str]], str]:
installed_s = installed.to_version_string(skip_matcher=True)
installed_line = ["installed", installed_s, ""]
update_info = ""
Expand Down Expand Up @@ -208,7 +211,7 @@ def _get_dbt_plugins_info() -> Iterator[Tuple[str, str]]:
except ImportError:
# not an adapter
continue
yield plugin_name, mod.version # type: ignore
yield plugin_name, mod.version


def _get_adapter_plugin_names() -> Iterator[str]:
Expand Down
Loading