Skip to content

Commit 7414bc5

Browse files
committed
Ruff fixes B007.
1 parent 9390f46 commit 7414bc5

File tree

5 files changed

+7
-7
lines changed

5 files changed

+7
-7
lines changed

distutils/command/build_clib.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ def get_library_names(self):
155155
return None
156156

157157
lib_names = []
158-
for lib_name, build_info in self.libraries:
158+
for lib_name, _build_info in self.libraries:
159159
lib_names.append(lib_name)
160160
return lib_names
161161

distutils/command/build_py.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ def find_data_files(self, package, src_dir):
136136

137137
def build_package_data(self):
138138
"""Copy data files into build directory"""
139-
for package, src_dir, build_dir, filenames in self.data_files:
139+
for _package, src_dir, build_dir, filenames in self.data_files:
140140
for filename in filenames:
141141
target = os.path.join(build_dir, filename)
142142
self.mkpath(os.path.dirname(target))
@@ -309,7 +309,7 @@ def get_module_outfile(self, build_dir, package, module):
309309
def get_outputs(self, include_bytecode=1):
310310
modules = self.find_all_modules()
311311
outputs = []
312-
for package, module, module_file in modules:
312+
for package, module, _module_file in modules:
313313
package = package.split('.')
314314
filename = self.get_module_outfile(self.build_lib, package, module)
315315
outputs.append(filename)

distutils/command/install.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -683,7 +683,7 @@ def create_home_path(self):
683683
if not self.user:
684684
return
685685
home = convert_path(os.path.expanduser("~"))
686-
for name, path in self.config_vars.items():
686+
for _name, path in self.config_vars.items():
687687
if str(path).startswith(home) and not os.path.isdir(path):
688688
self.debug_print("os.makedirs('%s', 0o700)" % path)
689689
os.makedirs(path, 0o700)

distutils/command/sdist.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -308,7 +308,7 @@ def _add_defaults_python(self):
308308

309309
# getting package_data files
310310
# (computed in build_py.data_files by build_py.finalize_options)
311-
for pkg, src_dir, build_dir, filenames in build_py.data_files:
311+
for _pkg, src_dir, _build_dir, filenames in build_py.data_files:
312312
for filename in filenames:
313313
self.filelist.append(os.path.join(src_dir, filename))
314314

distutils/dist.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -414,7 +414,7 @@ def parse_config_files(self, filenames=None): # noqa: C901
414414
# to set Distribution options.
415415

416416
if 'global' in self.command_options:
417-
for opt, (src, val) in self.command_options['global'].items():
417+
for opt, (_src, val) in self.command_options['global'].items():
418418
alias = self.negative_opt.get(opt)
419419
try:
420420
if alias:
@@ -585,7 +585,7 @@ def _parse_command_opts(self, parser, args): # noqa: C901
585585
cmd_class.help_options, list
586586
):
587587
help_option_found = 0
588-
for help_option, short, desc, func in cmd_class.help_options:
588+
for help_option, _short, _desc, func in cmd_class.help_options:
589589
if hasattr(opts, parser.get_attr_name(help_option)):
590590
help_option_found = 1
591591
if callable(func):

0 commit comments

Comments
 (0)