Skip to content

Commit 9899716

Browse files
committed
resolve ruff check failing
1 parent ab96e0d commit 9899716

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,
@@ -61,9 +60,11 @@ def classify_char(char: str) -> CharType | None:
6160
6261
- 'CharType.NUMERIC': if the character is a digit (0-9)
6362
- 'CharType.SIGN': if the character is a plus sign (+) or a minus sign (-)
64-
- 'CharType.EXPONENT': if the character is an 'e' or 'E' (used in exponential notation)
63+
- 'CharType.EXPONENT': if the character is an 'e' or 'E'
64+
(used in exponential notation)
6565
- 'CharType.DECIMAL': if the character is a decimal point (.)
66-
- None: if the character does not fit into any of the above categories or size of char is not 1
66+
- None: if the character does not fit into any of the above categories
67+
- None: if size of char is not 1
6768
6869
Parameters:
6970
char (str): The character to be classified

0 commit comments

Comments
 (0)