Skip to content
This repository has been archived by the owner on Feb 17, 2021. It is now read-only.

Commit

Permalink
Single source version
Browse files Browse the repository at this point in the history
  • Loading branch information
staticdev committed Apr 6, 2020
1 parent e0450d5 commit 3c710fc
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 4 deletions.
6 changes: 3 additions & 3 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ homepage = "https://github.com/staticdev/toml-validator"
python = "^3.7"
tomlkit = "^0.5.9"
click = "^7.0"
importlib_metadata = {version = "^1.6.0", python = "<3.8"}

[tool.poetry.dev-dependencies]
pytest = "^5.3.5"
Expand Down
12 changes: 11 additions & 1 deletion src/toml_validator/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1,11 @@
__version__ = "0.1.0"
"""The TOML validator."""
try:
from importlib.metadata import version, PackageNotFoundError # type: ignore
except ImportError: # pragma: no cover
from importlib_metadata import version, PackageNotFoundError # type: ignore


try:
__version__ = version(__name__)
except PackageNotFoundError: # pragma: no cover
__version__ = "unknown"

0 comments on commit 3c710fc

Please sign in to comment.