Skip to content

Commit 640e55b

Browse files
MAINT: Apply ruff/flake8-bugbear rule B010
B010 Do not call `setattr` with a constant attribute value. It is not any safer than normal property access.
1 parent 24cfd9a commit 640e55b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

numpy/f2py/f2py2e.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -547,7 +547,7 @@ def __call__(self, parser, namespace, values, option_string=None):
547547
include_paths_set.update(values.split(':'))
548548
else:
549549
include_paths_set.add(values)
550-
setattr(namespace, 'include_paths', list(include_paths_set))
550+
namespace.include_paths = list(include_paths_set)
551551

552552
def f2py_parser():
553553
parser = argparse.ArgumentParser(add_help=False)

0 commit comments

Comments
 (0)