diff --git a/.flake8 b/.flake8 deleted file mode 100644 index c33acaf..0000000 --- a/.flake8 +++ /dev/null @@ -1,18 +0,0 @@ -[flake8] -max-line-length = 125 - -## IGNORES - -# E126: yapf conflicts with "continuation line over-indented for hanging indent" - -# E127: flake8 reporting incorrect continuation line indent errors -# on multi-line and multi-level indents - -# W503: flake8 reports this as incorrect, and scripts/format_code -# changes code to it, so let format_code win. - -ignore = E126,E127,W503 - -exclude = - docs/build - .tox diff --git a/stactask/__init__.py b/stactask/__init__.py index d50ef90..d68fab3 100644 --- a/stactask/__init__.py +++ b/stactask/__init__.py @@ -1,8 +1,10 @@ -# flake8: noqa +from importlib.metadata import PackageNotFoundError, version -import pkg_resources - -__version__ = pkg_resources.get_distribution(__package__).version +try: + __version__ = version("stactask") +except PackageNotFoundError: + # package is not installed + pass from .task import Task