From 62cecfeb250db68d6da1324b9cd0c4f6ce3550a7 Mon Sep 17 00:00:00 2001 From: Maarten ter Huurne Date: Tue, 21 Mar 2023 14:26:11 +0100 Subject: [PATCH] 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`. --- model_utils/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/model_utils/__init__.py b/model_utils/__init__.py index cf1b22c..14b50cc 100644 --- a/model_utils/__init__.py +++ b/model_utils/__init__.py @@ -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")