Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add next to FBT003 exclusions #6711

Closed
Garrett-R opened this issue Aug 21, 2023 · 1 comment · Fixed by #6729
Closed

Add next to FBT003 exclusions #6711

Garrett-R opened this issue Aug 21, 2023 · 1 comment · Fixed by #6729
Assignees
Labels
accepted Ready for implementation bug Something isn't working

Comments

@Garrett-R
Copy link

Garrett-R commented Aug 21, 2023

Following on from this discussion and this PR, it might be good to add the Python builtin next to the exclusions list for FBT003.

Consider this code:

next(my_generator, False)

The rule is upset about False here, but there is no keyword arg you can use. Trying to use default=False yields: TypeError: next() takes no keyword arguments.

@charliermarsh charliermarsh added accepted Ready for implementation bug Something isn't working labels Aug 21, 2023
@charliermarsh charliermarsh self-assigned this Aug 21, 2023
charliermarsh added a commit that referenced this issue Aug 21, 2023
@Garrett-R
Copy link
Author

Heyooo! 🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
accepted Ready for implementation bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants