Skip to content

Commit 70edaa0

Browse files
authored
Remove unused code (#60860)
1 parent 51187b3 commit 70edaa0

File tree

1 file changed

+0
-44
lines changed

1 file changed

+0
-44
lines changed

pandas/core/computation/parsing.py

-44
Original file line numberDiff line numberDiff line change
@@ -123,16 +123,6 @@ def clean_column_name(name: Hashable) -> Hashable:
123123
-------
124124
name : hashable
125125
Returns the name after tokenizing and cleaning.
126-
127-
Notes
128-
-----
129-
For some cases, a name cannot be converted to a valid Python identifier.
130-
In that case :func:`tokenize_string` raises a SyntaxError.
131-
In that case, we just return the name unmodified.
132-
133-
If this name was used in the query string (this makes the query call impossible)
134-
an error will be raised by :func:`tokenize_backtick_quoted_string` instead,
135-
which is not caught and propagates to the user level.
136126
"""
137127
try:
138128
# Escape backticks
@@ -145,40 +135,6 @@ def clean_column_name(name: Hashable) -> Hashable:
145135
return name
146136

147137

148-
def tokenize_backtick_quoted_string(
149-
token_generator: Iterator[tokenize.TokenInfo], source: str, string_start: int
150-
) -> tuple[int, str]:
151-
"""
152-
Creates a token from a backtick quoted string.
153-
154-
Moves the token_generator forwards till right after the next backtick.
155-
156-
Parameters
157-
----------
158-
token_generator : Iterator[tokenize.TokenInfo]
159-
The generator that yields the tokens of the source string (Tuple[int, str]).
160-
The generator is at the first token after the backtick (`)
161-
162-
source : str
163-
The Python source code string.
164-
165-
string_start : int
166-
This is the start of backtick quoted string inside the source string.
167-
168-
Returns
169-
-------
170-
tok: Tuple[int, str]
171-
The token that represents the backtick quoted string.
172-
The integer is equal to BACKTICK_QUOTED_STRING (100).
173-
"""
174-
for _, tokval, start, _, _ in token_generator:
175-
if tokval == "`":
176-
string_end = start[1]
177-
break
178-
179-
return BACKTICK_QUOTED_STRING, source[string_start:string_end]
180-
181-
182138
class ParseState(Enum):
183139
DEFAULT = 0
184140
IN_BACKTICK = 1

0 commit comments

Comments
 (0)