Skip to content
This repository was archived by the owner on Apr 25, 2023. It is now read-only.

Commit 57ade29

Browse files
committed
Fixed pylint issue R1705
1 parent 74c5330 commit 57ade29

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

ilanguage/Main/lexer.py

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -232,21 +232,22 @@ def gettoken(string: str, line: int, column: int) -> Optional[LexerToken]:
232232
if string in list(KEYWORDS):
233233
return LexerToken(KEYWORDS[string], string)
234234

235-
elif len(string) > 1 and string[0] == "_":
235+
if len(string) > 1 and string[0] == "_":
236236
return LexerToken("BUILTIN_CONST", string)
237237

238-
elif string in ["true", "false"]:
238+
if string in ["true", "false"]:
239239
return LexerToken("BOOL", string)
240240

241-
elif string in BASE_TYPES:
241+
if string in BASE_TYPES:
242242
return LexerToken("BASETYPE", string)
243243

244-
elif validate_integer(string) and len(string) > 0:
244+
if validate_integer(string) and len(string) > 0:
245245
return LexerToken("INT", string)
246246

247-
elif len(string) > 0 and string[0] not in DIGITS_AS_STRINGS and len(string) > 0:
247+
if string[0] not in DIGITS_AS_STRINGS and len(string) > 0:
248248
return LexerToken("NAME", string)
249-
else:
249+
250+
if not len(string) > 0:
250251
LexerError(f"Unrecognized Pattern: {string!r}", line, column)
251252

252253
return None

0 commit comments

Comments
 (0)