Skip to content

Commit

Permalink
Fix ruff/bugbear issues (B006)
Browse files Browse the repository at this point in the history
B006 Do not use mutable data structures for argument defaults

https://docs.astral.sh/ruff/rules/mutable-argument-default/
  • Loading branch information
DimitriPapadopoulos committed Apr 13, 2024
1 parent 5598256 commit 4d3ab16
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion distutils/command/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -328,7 +328,7 @@ def check_lib(
library_dirs=None,
headers=None,
include_dirs=None,
other_libraries: Sequence[str] = [],
other_libraries: Sequence[str] = (),
):
"""Determine if 'library' is available to be linked against,
without actually checking that any particular symbols are provided
Expand Down
2 changes: 1 addition & 1 deletion distutils/fancy_getopt.py
Original file line number Diff line number Diff line change
Expand Up @@ -449,7 +449,7 @@ class OptionDummy:
"""Dummy class just used as a place to hold command-line option
values as instance attributes."""

def __init__(self, options: Sequence[Any] = []):
def __init__(self, options: Sequence[Any] = ()):
"""Create a new OptionDummy instance. The attributes listed in
'options' will be initialized to None."""
for opt in options:
Expand Down
2 changes: 1 addition & 1 deletion distutils/tests/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
from typing import Sequence


def missing_compiler_executable(cmd_names: Sequence[str] = []): # pragma: no cover
def missing_compiler_executable(cmd_names: Sequence[str] = ()): # pragma: no cover
"""Check if the compiler components used to build the interpreter exist.
Check for the existence of the compiler executables whose names are listed
Expand Down

0 comments on commit 4d3ab16

Please sign in to comment.