Skip to content

Commit

Permalink
fix: follow ruff linter guides to remove unused alternative import an…
Browse files Browse the repository at this point in the history
…d thus remove sys import
  • Loading branch information
lmmx committed Jan 14, 2024
1 parent eba71e3 commit a0509a9
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions scripts/gen_credits.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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"]
Expand Down

0 comments on commit a0509a9

Please sign in to comment.