File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -135,7 +135,9 @@ def clean_column_name(name: Hashable) -> Hashable:
135
135
which is not caught and propagates to the user level.
136
136
"""
137
137
try :
138
- name = name .replace ("`" , "``" ) # Escape backticks
138
+ # Escape backticks
139
+ name = name .replace ("`" , "``" ) if isinstance (name , str ) else name
140
+
139
141
tokenized = tokenize_string (f"`{ name } `" )
140
142
tokval = next (tokenized )[1 ]
141
143
return create_valid_python_identifier (tokval )
@@ -203,7 +205,7 @@ def _split_by_backtick(s: str) -> list[tuple[bool, str]]:
203
205
The second is the actual substring.
204
206
"""
205
207
substrings = []
206
- substr = [] # collect in a list, join into a string before adding to substrings
208
+ substr : list [ str ] = [] # join into a string before adding to ` substrings`
207
209
i = 0
208
210
parse_state = ParseState .DEFAULT
209
211
while i < len (s ):
You can’t perform that action at this time.
0 commit comments