Skip to content

Commit 5644bd2

Browse files
Fix import error in __init__.py by adding fallback import
Co-authored-by: willtheorangeguy <[email protected]>
1 parent 998fee1 commit 5644bd2

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

__init__.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
"""Initialize PyPI Package"""
22
# pylint: disable=invalid-name, import-error
33

4-
from main import workout
4+
try:
5+
from main import workout
6+
except ImportError:
7+
from .main import workout
58

69
__all__ = ["workout"]

0 commit comments

Comments
 (0)