Use assignment instead of annotation in third party enums (#11957)

This commit is contained in:
Ali Hamdan
2024-05-18 17:31:39 +02:00
committed by GitHub
parent 5bd7150139
commit bd306f6b4c
7 changed files with 58 additions and 58 deletions

View File

@@ -1,7 +1,7 @@
from enum import IntEnum
class ATNType(IntEnum):
LEXER: int
PARSER: int
LEXER = 0
PARSER = 1
@classmethod
def fromOrdinal(cls, i: int): ...

View File

@@ -4,14 +4,14 @@ from enum import IntEnum
Lexer: Incomplete
class LexerActionType(IntEnum):
CHANNEL: int
CUSTOM: int
MODE: int
MORE: int
POP_MODE: int
PUSH_MODE: int
SKIP: int
TYPE: int
CHANNEL = 0
CUSTOM = 1
MODE = 2
MORE = 3
POP_MODE = 4
PUSH_MODE = 5
SKIP = 6
TYPE = 7
class LexerAction:
actionType: Incomplete

View File

@@ -8,9 +8,9 @@ from antlr4.atn.ATNState import RuleStopState as RuleStopState
from antlr4.atn.SemanticContext import SemanticContext as SemanticContext
class PredictionMode(Enum):
SLL: int
LL: int
LL_EXACT_AMBIG_DETECTION: int
SLL = 0
LL = 1
LL_EXACT_AMBIG_DETECTION = 2
@classmethod
def hasSLLConflictTerminatingPrediction(cls, mode: PredictionMode, configs: ATNConfigSet): ...
@classmethod