Skip to content

Commit

Permalink
Add missing type hints
Browse files Browse the repository at this point in the history
  • Loading branch information
desertaxle committed Feb 12, 2025
1 parent 0524622 commit e14bf83
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/prefect/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,14 +42,14 @@ class VersionInfo(TypedDict("_FullRevisionId", {"full-revisionid": str})):
date: Optional[str]


version_str = _version.__version__
is_dev = ".dev" in version_str
has_git_hash = "+g" in version_str
version_str: str = _version.__version__
is_dev: bool = ".dev" in version_str
has_git_hash: bool = "+g" in version_str

# Try to extract date in YYYYMMDD format from version string
date = None
date: Optional[str] = None
if has_git_hash:
parts = version_str.split(".")
parts: list[str] = version_str.split(".")
if len(parts[-1]) == 8 and parts[-1].isdigit(): # YYYYMMDD format
date = parts[-1]
else:
Expand Down

0 comments on commit e14bf83

Please # to comment.