diff --git a/docs/conf.py b/docs/conf.py index 50aefc545..6370445ff 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -10,20 +10,17 @@ try: - from mqt.bench import __version__ as version + version = metadata.version("mqt.bench") except ModuleNotFoundError: - try: - version = metadata.version("mqt.bench") - except ModuleNotFoundError: - msg = ( - "Package should be installed to produce documentation! " - "Assuming a modern git archive was used for version discovery." - ) - warnings.warn(msg, stacklevel=1) - - from setuptools_scm import get_version - - version = get_version(root=str(ROOT), fallback_root=ROOT) + msg = ( + "Package should be installed to produce documentation! " + "Assuming a modern git archive was used for version discovery." + ) + warnings.warn(msg, stacklevel=1) + + from setuptools_scm import get_version + + version = get_version(root=str(ROOT), fallback_root=ROOT) # Filter git details from version release = version.split("+")[0] diff --git a/src/mqt/bench/__init__.py b/src/mqt/bench/__init__.py index 9c88365a7..071d7c8fe 100644 --- a/src/mqt/bench/__init__.py +++ b/src/mqt/bench/__init__.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from mqt.bench.benchmark_generator import ( generate, get_benchmark,