-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
6b978ad
commit 66d7e2d
Showing
3 changed files
with
20 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
def get_version() -> str: | ||
try: | ||
import importlib.metadata # pylint: disable=import-outside-toplevel | ||
|
||
# Copy the version number from where it's set in pyproject.toml | ||
return importlib.metadata.version("groundlight") | ||
except ModuleNotFoundError: | ||
# importlib.metadata was only added in py3.8 | ||
# We're still supporting py3.7 | ||
return "(version number available in python 3.8+)" |