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

@ -519,7 +519,7 @@ def get_subs(file):
sub_ext = ['.srt', '.sub', '.idx']
name = os.path.splitext(os.path.split(file)[1])[0]
path = os.path.split(file)[0]
for directory, directories, filenames in os.walk(path):
for directory, _, filenames in os.walk(path):
for filename in filenames:
filepaths.extend([os.path.join(directory, filename)])
subfiles = [item for item in filepaths if os.path.splitext(item)[1] in sub_ext and name in item]