You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When list/set/dict from the outer call is an overshadowed binding, the inner map() call is not reported at all:
map(lambdax: x, [])
# ^^^^^^^^^^^^^^^^^^^^ Reportedlist(map(lambdax: x, []))
# ^^^^^^^^^^^^^^^^^^^^^^^^^^ Outer `list()` call reported, nested `map()` call not reporteddef_():
list= ... # Overshadowedmap(lambdax: x, [])
# ^^^^^^^^^^^^^^^^^^^^ Reportedlist(map(lambdax: x, [])) # Currently no error# ^^^^^^^^^^^^^^^^^^^^ This should be reported on its own merit
If the iterable is a starred expression, the fix outputs a comprehension with different semantics:
While working on #15802, I noticed a few problems with
C417
(playground).When
list
/set
/dict
from the outer call is an overshadowed binding, the innermap()
call is not reported at all:If the iterable is a starred expression, the fix outputs a comprehension with different semantics:
The rule currently also doesn't report when there are multiple iterables:
The text was updated successfully, but these errors were encountered: