Skip to content

Commit

Permalink
refactor: split __version__ to new module
Browse files Browse the repository at this point in the history
this affects startup time
  • Loading branch information
jnoortheen committed Jan 2, 2021
1 parent 16b7e92 commit e60b059
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 9 deletions.
9 changes: 0 additions & 9 deletions arger/__init__.py
Original file line number Diff line number Diff line change
@@ -1,10 +1 @@
from pkg_resources import DistributionNotFound, get_distribution

from .main import Arger, Argument

try:
__version__ = get_distribution("arger").version
except DistributionNotFound:
__version__ = "(local)"

__all__ = ["Arger", "Argument"]
6 changes: 6 additions & 0 deletions arger/__version__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
from pkg_resources import DistributionNotFound, get_distribution

try:
__version__ = get_distribution("arger").version
except DistributionNotFound:
__version__ = "(local)"

0 comments on commit e60b059

Please sign in to comment.