Skip to content

Commit 7e7e530

Browse files
committed
Refactor type hints in setup.py to use built-in types
Signed-off-by: Tsuyoshi Hombashi <tsuyoshi.hombashi@gmail.com>
1 parent 09cf280 commit 7e7e530

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

setup.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import os.path
2-
from typing import Dict, Final, List, Type
2+
from typing import Final
33

44
import setuptools
55

@@ -10,10 +10,10 @@
1010
REQUIREMENT_DIR: Final = "requirements"
1111
ENCODING: Final = "utf8"
1212

13-
pkg_info: Dict[str, str] = {}
13+
pkg_info: dict[str, str] = {}
1414

1515

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

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

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

3737
setuptools.setup(
3838
name=MODULE_NAME,

0 commit comments

Comments
 (0)