Skip to content

Fix false positive issue with '_' variable#17

Open
leoncleonc wants to merge 1 commit intobest-doctor:masterfrom
leoncleonc:add_builtins_whitelist_for_underscore_variable_name
Open

Fix false positive issue with '_' variable#17
leoncleonc wants to merge 1 commit intobest-doctor:masterfrom
leoncleonc:add_builtins_whitelist_for_underscore_variable_name

Conversation

@leoncleonc
Copy link

Fix issue with underscore variable name.

def foo(bar: str) -> None:
    print(bar)

for _ in range(10):  # <- variable names that shadow builtins are not allowed Flake8 (VNE003)
    foo('hello')

@Arondit
Copy link
Contributor

Arondit commented Mar 12, 2025

@leoncleonc hello. Could you please also make a test for this case? Thank you very much for your help.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants