From 914b0b052866558cde2482eb0903b3e50b483ad2 Mon Sep 17 00:00:00 2001 From: reniz-shah Date: Thu, 8 Aug 2024 10:38:10 +0530 Subject: [PATCH] resolve ruff check failing --- strings/string_is_valid_number.py | 46 ------------------------------- 1 file changed, 46 deletions(-) diff --git a/strings/string_is_valid_number.py b/strings/string_is_valid_number.py index ac35e88b8..cfd941630 100644 --- a/strings/string_is_valid_number.py +++ b/strings/string_is_valid_number.py @@ -8,52 +8,6 @@ Leetcode link: https://leetcode.com/problems/valid-number/description/ from enum import Enum -class CharType(Enum): - NUMERIC = "NUMERIC" - SIGN = "SIGN" - EXPONENT = "EXPONENT" - DECIMAL = "DECIMAL" - - -class State(Enum): - INITIAL = "INITIAL" - SIGNED = "SIGNED" - WHOLE = "WHOLE" - FRACTIONAL = "FRACTIONAL" - FRACTION = "FRACTION" - EXPONENTIAL = "EXPONENTIAL" - EXP_SIGN = "EXP_SIGN" - EXP_NUMBER = "EXP_NUMBER" - - -state_machine: dict[State, dict[CharType, State]] = { - State.INITIAL: { - CharType.NUMERIC: State.WHOLE, - CharType.SIGN: State.SIGNED, - CharType.DECIMAL: State.FRACTIONAL, - }, - State.SIGNED: {CharType.NUMERIC: State.WHOLE, CharType.DECIMAL: State.FRACTIONAL}, - State.WHOLE: { - CharType.NUMERIC: State.WHOLE, - CharType.DECIMAL: State.FRACTION, - CharType.EXPONENT: State.EXPONENTIAL, - }, - State.FRACTIONAL: {CharType.NUMERIC: State.FRACTION}, - State.FRACTION: { - CharType.NUMERIC: State.FRACTION, - CharType.EXPONENT: State.EXPONENTIAL, - }, - State.EXPONENTIAL: { - CharType.NUMERIC: State.EXP_NUMBER, - CharType.SIGN: State.EXP_SIGN, - }, - State.EXP_SIGN: {CharType.NUMERIC: State.EXP_NUMBER}, - State.EXP_NUMBER: {CharType.NUMERIC: State.EXP_NUMBER}, -} - -from enum import Enum - - class CharType(Enum): NUMERIC = "NUMERIC" SIGN = "SIGN"