Suppress error about __version__ being None when not installed

Suppress rather than annotate, because people type checking against
`django-model-utils` will always have it installed and therefore
should not have to deal with `__version__` being `None`.
This commit is contained in:
Maarten ter Huurne 2023-03-21 14:26:11 +01:00
parent f3335a7fe1
commit 62cecfeb25

View file

@ -7,6 +7,6 @@ try:
__version__ = importlib.metadata.version('django-model-utils')
except importlib.metadata.PackageNotFoundError: # pragma: no cover
# package is not installed
__version__ = None
__version__ = None # type: ignore[assignment]
__all__ = ("Choices", "FieldTracker", "ModelTracker")