Skip to content

Commit 0b4271a

Browse files
committed
resolve ruff check failing
1 parent aaf90cd commit 0b4271a

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

strings/string_is_valid_number.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
"""
99

1010
from enum import Enum
11-
from typing import Dict
1211

1312

1413
class CharType(Enum):
@@ -29,7 +28,7 @@ class State(Enum):
2928
EXP_NUMBER = "EXP_NUMBER"
3029

3130

32-
state_machine: Dict[State, Dict[CharType, State]] = {
31+
state_machine: dict[State, dict[CharType, State]] = {
3332
State.INITIAL: {
3433
CharType.NUMERIC: State.WHOLE,
3534
CharType.SIGN: State.SIGNED,
@@ -155,9 +154,11 @@ def classify_char(char: str) -> CharType | None:
155154
156155
- 'CharType.NUMERIC': if the character is a digit (0-9)
157156
- 'CharType.SIGN': if the character is a plus sign (+) or a minus sign (-)
158-
- 'CharType.EXPONENT': if the character is an 'e' or 'E' (used in exponential notation)
157+
- 'CharType.EXPONENT': if the character is an 'e' or 'E'
158+
(used in exponential notation)
159159
- 'CharType.DECIMAL': if the character is a decimal point (.)
160-
- None: if the character does not fit into any of the above categories or size of char is not 1
160+
- None: if the character does not fit into any of the above categories
161+
- None: if size of char is not 1
161162
162163
Parameters:
163164
char (str): The character to be classified

0 commit comments

Comments
 (0)