diff --git a/scripts/gen_credits.py b/scripts/gen_credits.py index bc01c0b..459f293 100644 --- a/scripts/gen_credits.py +++ b/scripts/gen_credits.py @@ -3,7 +3,7 @@ from __future__ import annotations import re -import sys +from importlib.metadata import PackageNotFoundError, metadata from itertools import chain from pathlib import Path from textwrap import dedent @@ -13,11 +13,6 @@ from jinja2 import StrictUndefined from jinja2.sandbox import SandboxedEnvironment -if sys.version_info < (3, 8): - from importlib_metadata import PackageNotFoundError, metadata -else: - from importlib.metadata import PackageNotFoundError, metadata - project_dir = Path(".") pyproject = toml.load(project_dir / "pyproject.toml") project = pyproject["project"]