From 7e7e5306ed05189169ec688d8861f0bb40fe1231 Mon Sep 17 00:00:00 2001 From: Tsuyoshi Hombashi Date: Sat, 4 Jan 2025 12:00:29 +0900 Subject: [PATCH] Refactor type hints in setup.py to use built-in types Signed-off-by: Tsuyoshi Hombashi --- setup.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/setup.py b/setup.py index b316fee..aaba08f 100644 --- a/setup.py +++ b/setup.py @@ -1,5 +1,5 @@ import os.path -from typing import Dict, Final, List, Type +from typing import Final import setuptools @@ -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: @@ -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,