-
Notifications
You must be signed in to change notification settings - Fork 37
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix version import #112
base: master
Are you sure you want to change the base?
Fix version import #112
Conversation
29d5773
to
d7925ec
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wouldn't remove the version from the setup.cfg
as this is the place for meta data - further I would make use of the importlib.metadata.version
from version import __version__ | ||
except ImportError: | ||
__version__ = "dev" | ||
from .__version__ import __version__ | ||
|
||
from pyfritzhome import Fritzhome |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
from pyfritzhome import Fritzhome | |
from pyfritzhome import Fritzhome, __version__ |
from version import __version__ | ||
except ImportError: | ||
__version__ = "dev" | ||
from .__version__ import __version__ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
from .__version__ import __version__ |
"""The fritzhome version.""" | ||
|
||
__version__ = "0.6.13" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"""The fritzhome version.""" | |
__version__ = "0.6.13" |
remove the file
from .errors import InvalidError, LoginError, NotLoggedInError | ||
from .fritzhome import Fritzhome | ||
from .fritzhomedevice import FritzhomeDevice | ||
from .__version__ import __version__ # noqa: F401 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
from .errors import InvalidError, LoginError, NotLoggedInError | |
from .fritzhome import Fritzhome | |
from .fritzhomedevice import FritzhomeDevice | |
from .__version__ import __version__ # noqa: F401 | |
try: | |
from importlib.metadata import version | |
__version__ = version(__name__) | |
except ImportError: | |
__version__ = "dev" | |
from .errors import InvalidError, LoginError, NotLoggedInError | |
from .fritzhome import Fritzhome | |
from .fritzhomedevice import FritzhomeDevice |
@@ -1,6 +1,6 @@ | |||
[metadata] | |||
name = pyfritzhome | |||
version = 0.6.13 | |||
version = attr: pyfritzhome.__version__ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
version = attr: pyfritzhome.__version__ | |
version = 0.6.13 |
Refactor import of current project version.