Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] authored and peymanslh committed Dec 13, 2023
1 parent 30107f5 commit 9cd3e77
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 11 deletions.
1 change: 1 addition & 0 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
# documentation root, use os.path.abspath to make it absolute, like shown here.
# sys.path.insert(0, os.path.abspath('.'))
from pipeline import __version__ as pipeline_version

# -- General configuration -----------------------------------------------------

# If your documentation needs a minimal Sphinx version, state it here.
Expand Down
22 changes: 11 additions & 11 deletions pipeline/__init__.py
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
PackageNotFoundError = None
try:
from importlib.metadata import PackageNotFoundError, version as get_version
from importlib.metadata import PackageNotFoundError
from importlib.metadata import version as get_version
except ImportError:
get_version = None

if get_version is None:
try:
from pkg_resources import DistributionNotFound as PackageNotFoundError, get_distribution
try:
from pkg_resources import DistributionNotFound as PackageNotFoundError
from pkg_resources import get_distribution


def get_version(x):
return get_distribution(x).version
except ImportError:
get_version = None
PackageNotFoundError = None
get_distribution = None
def get_version(x):
return get_distribution(x).version
except ImportError:
get_version = None
PackageNotFoundError = None
get_distribution = None

__version__ = None
if get_version is not None:
Expand Down

0 comments on commit 9cd3e77

Please sign in to comment.