mirror of
https://github.com/galaxyproject/galaxy.git
synced 2026-11-21 22:39:54 +08:00
flake8-bugbear 26.10.27 added the B045 check, which reports inner loops reusing the loop variable of an enclosing loop: ``` ./lib/galaxy/queue_worker/__init__.py:385:13: B045 Loop control variable module overrides a variable in an enclosing loop. Use a different name for the inner loop variable. ./lib/galaxy/tool_shed/galaxy_install/repository_dependencies/repository_dependency_manager.py:493:45: B045 Loop control variable repo_info_dict overrides a variable in an enclosing loop. Use a different name for the inner loop variable. ./lib/galaxy/tool_shed/galaxy_install/repository_dependencies/repository_dependency_manager.py:494:49: B045 Loop control variable k overrides a variable in an enclosing loop. Use a different name for the inner loop variable. ./lib/galaxy/tool_shed/galaxy_install/repository_dependencies/repository_dependency_manager.py:494:49: B045 Loop control variable v overrides a variable in an enclosing loop. Use a different name for the inner loop variable. ./lib/galaxy/tool_shed/metadata/metadata_generator.py:844:21: B045 Loop control variable repository_dependency_tup overrides a variable in an enclosing loop. Use a different name for the inner loop variable. ./lib/galaxy/tool_util/verify/interactor.py:941:21: B045 Loop control variable value overrides a variable in an enclosing loop. Use a different name for the inner loop variable. ./test/unit/data/test_model_copy.py:68:17: B045 Loop control variable i overrides a variable in an enclosing loop. Use a different name for the inner loop variable. ./tools/maf/interval2maf.py:145:17: B045 Loop control variable block overrides a variable in an enclosing loop. Use a different name for the inner loop variable. ``` In `_update_repository_dependencies_metadata()` the outer loop variable was never used: the loop only repeated the inner loop once per item, and passes after the first added nothing because of the `not in` check. Replace it with a check that `repository_dependency_tups` is not empty, which gives the same result. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>