Skip to content

Commit

Permalink
Refactor type hints in setup.py to use built-in types
Browse files Browse the repository at this point in the history
Signed-off-by: Tsuyoshi Hombashi <[email protected]>
  • Loading branch information
thombashi committed Jan 4, 2025
1 parent 09cf280 commit 7e7e530
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import os.path
from typing import Dict, Final, List, Type
from typing import Final

import setuptools

Expand All @@ -10,10 +10,10 @@
REQUIREMENT_DIR: Final = "requirements"
ENCODING: Final = "utf8"

pkg_info: Dict[str, str] = {}
pkg_info: dict[str, str] = {}


def get_release_command_class() -> Dict[str, Type[setuptools.Command]]:
def get_release_command_class() -> dict[str, type[setuptools.Command]]:
try:
from releasecmd import ReleaseCommand
except ImportError:
Expand All @@ -29,10 +29,10 @@ def get_release_command_class() -> Dict[str, Type[setuptools.Command]]:
LONG_DESCRIPTION: Final = f.read()

with open(os.path.join(REQUIREMENT_DIR, "requirements.txt")) as f:
INSTALL_REQUIRES: Final[List[str]] = [line.strip() for line in f if line.strip()]
INSTALL_REQUIRES: Final[list[str]] = [line.strip() for line in f if line.strip()]

with open(os.path.join(REQUIREMENT_DIR, "test_requirements.txt")) as f:
TESTS_REQUIRES: Final[List[str]] = [line.strip() for line in f if line.strip()]
TESTS_REQUIRES: Final[list[str]] = [line.strip() for line in f if line.strip()]

setuptools.setup(
name=MODULE_NAME,
Expand Down

0 comments on commit 7e7e530

Please sign in to comment.