Skip to content

Commit

Permalink
mypy
Browse files Browse the repository at this point in the history
  • Loading branch information
coilysiren committed Oct 23, 2023
1 parent f96d350 commit e42cedd
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/python/tokenizer_script.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
import typing


DEBUG = bool(int(os.getenv("DEBUG")))
DEBUG = bool(int(os.getenv("DEBUG", "0")))


@dataclasses.dataclass(frozen=True)
Expand Down Expand Up @@ -59,12 +59,12 @@ def tokenize_sql(self, sql: list[str]) -> list[SQLTokens]:
raise ValueError(f"Unknown worker function: {this_worker_str}")

# tokenize args
args_list = []
args_list: list[list] = []
for i, sentence in enumerate(args_strs):
args_list.append([])
word_start = 0
word_start: int | None = 0
inside_list = False
string_start = (None, None)
string_start: tuple[int | None, str | None] = (None, None)
for k, letter in enumerate(sentence):
if (string_start[0] is None) and (letter in ["'", '"']):
if DEBUG:
Expand Down

0 comments on commit e42cedd

Please sign in to comment.