Rename variable so we don't overwrite the parameter (#3369)

Co-authored-by: Disconnect3d <dominik.b.czarnota@gmail.com>
pull/3363/head
OBarronCS 2 months ago committed by GitHub
parent 100719166d
commit bc259f0473
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -70,8 +70,8 @@ def _pygments_get_lexer_for_filename(filename, code, **options):
matched_lexer = ""
fn = os.path.basename(filename)
for name, _, filenames, _ in pygments.lexers.get_all_lexers(plugins=False):
for filename in filenames:
if _fn_matches(fn, filename):
for candidate_filename in filenames:
if _fn_matches(fn, candidate_filename):
if one_match:
# already seen one match, this is a second match
one_match = False

Loading…
Cancel
Save