Skip to content

Commit

Permalink
Modify to use Python 3.9 syntax
Browse files Browse the repository at this point in the history
Signed-off-by: Tsuyoshi Hombashi <tsuyoshi.hombashi@gmail.com>
  • Loading branch information
thombashi committed Dec 29, 2024
1 parent d39e07e commit 95745d4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
5 changes: 2 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
"""

import os.path
from typing import Dict, Type

import setuptools

Expand All @@ -13,10 +12,10 @@
REQUIREMENT_DIR = "requirements"
ENCODING = "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 Down
4 changes: 2 additions & 2 deletions typepy/_function.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"""

import re
from typing import Any, Optional, Type
from typing import Any, Optional

from ._const import StrictLevel
from .type import AbstractType, Integer, NullString, RealNumber, String
Expand Down Expand Up @@ -40,7 +40,7 @@ def is_not_empty_sequence(value: Any) -> bool:
return False


def extract_typepy_from_dtype(dtype) -> Optional[Type[AbstractType]]:
def extract_typepy_from_dtype(dtype) -> Optional[type[AbstractType]]:
dtype = str(dtype)

if re.search("^float", dtype):
Expand Down

0 comments on commit 95745d4

Please sign in to comment.