Fix flake8-bugbear B007 Loop control variable not used within the loop body.

This commit is contained in:
Labrys of Knossos 2019-04-05 16:02:23 -04:00
parent e00b5cc195
commit 4c8e896bbb
7 changed files with 10 additions and 10 deletions

View file

@ -121,7 +121,7 @@ def reverse_filename(filename, dirname, name):
def rename_script(dirname):
rename_file = ''
for directory, directories, files in os.walk(dirname):
for directory, _, files in os.walk(dirname):
for file in files:
if re.search(r'(rename\S*\.(sh|bat)$)', file, re.IGNORECASE):
rename_file = os.path.join(directory, file)