mirror of
https://github.com/Aider-AI/aider.git
synced 2025-06-02 18:54:59 +00:00
noop
This commit is contained in:
parent
27bd993cab
commit
d28cb2beea
1 changed files with 3 additions and 2 deletions
|
@ -280,8 +280,9 @@ def get_name_identifiers(fname, uniq=True):
|
||||||
lexer = guess_lexer_for_filename(fname, content)
|
lexer = guess_lexer_for_filename(fname, content)
|
||||||
except ClassNotFound:
|
except ClassNotFound:
|
||||||
return list()
|
return list()
|
||||||
tokens = list(lexer.get_tokens(content))
|
# lexer.get_tokens_unprocessed() returns (char position in file, token type, token string)
|
||||||
res = [token[1] for token in tokens if token[0] in Token.Name]
|
tokens = list(lexer.get_tokens_unprocessed(content))
|
||||||
|
res = [token[2] for token in tokens if token[1] in Token.Name]
|
||||||
if uniq:
|
if uniq:
|
||||||
res = set(res)
|
res = set(res)
|
||||||
return res
|
return res
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue