Skip to content

Commit 1c0fa11

Browse files
committed
Add tokenize.TokenInfo as a type
1 parent 9481eac commit 1c0fa11

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

pandas/core/computation/expr.py

+4-2
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
import itertools as it
88
import token
99
import tokenize
10-
from typing import Any, Generator, Tuple, Type
10+
from typing import Generator, Tuple, Type
1111

1212
import numpy as np
1313

@@ -42,7 +42,9 @@
4242
Tok = Tuple[int, str]
4343

4444

45-
def tokenize_backtick_quoted_string(token_generator) -> Tok:
45+
def tokenize_backtick_quoted_string(
46+
token_generator: Generator[tokenize.TokenInfo, None, None]
47+
) -> Tok:
4648
"""Creates a token from a backtick quoted string.
4749
Moves the token_generator forwards till right after the next backtick."""
4850
prev_toknum = token.OP # This will trigger the first token to have no space

0 commit comments

Comments
 (0)