mirror of
https://github.com/astral-sh/ruff.git
synced 2025-09-29 05:15:12 +00:00

Flake8-builtins provides two checks for arguments (really, parameters) of a function shadowing builtins: A002 checks function definitions, and A006 checks lambda expressions. This PR ensures that A002 is restricted to functions rather than lambda expressions. Closes #14135 .
10 lines
No EOL
267 B
Python
10 lines
No EOL
267 B
Python
lambda print, copyright: print
|
|
lambda x, float, y: x + y
|
|
lambda min, max: min
|
|
lambda id: id
|
|
lambda dir: dir
|
|
|
|
# Ok for A006 - should trigger A002 instead
|
|
# https://github.com/astral-sh/ruff/issues/14135
|
|
def func1(str, /, type, *complex, Exception, **getattr):
|
|
pass |