summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGabriel Feo <gabriel@gabrielfeo.com>2024-02-02 14:02:23 +0000
committerGitHub <noreply@github.com>2024-02-02 14:02:23 +0000
commit88ea01b1e97cc21b03fe151416253cc9a1c1878e (patch)
tree0c0556c96bdca633b8b226ca871843b69ebaf3a3
parent73dda1644d5173b9b3bd737a759b3b49a2650a7a (diff)
Fix usage via generated bin
When installed from source (`pip install .`), using the module as described in readme (`python3 -m owners -h`) works as expected. However, using via the generated bin results in an error: ```bash $ owners -h Traceback (most recent call last): File "/opt/homebrew/bin/owners", line 5, in <module> from owners import entrypoint ImportError: cannot import name 'entrypoint' from 'owners' (/opt/homebrew/lib/python3.11/site-packages/owners/__init__.py) ``` Fix by importing the entrypoint in module init.
-rw-r--r--owners/__init__.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/owners/__init__.py b/owners/__init__.py
index 609d502..a19c759 100644
--- a/owners/__init__.py
+++ b/owners/__init__.py
@@ -1,4 +1,6 @@
"""CLI tool to inspect CODEOWNERS file.
"""
+from ._cli import entrypoint
+
__version__ = '0.1.1'