Skip to content

STYLE enable B005 check in flake8-bugbear #49707

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

Merged
merged 10 commits into from
Nov 17, 2022
Merged

Conversation

MarcoGorelli
Copy link
Member

From #40570 (comment)

B005 would also be great

I agree, strip / rstrip / lstrip are common sources of confusion https://docs.python.org/3/library/stdtypes.html#str.lstrip , e.g.

>>> 'Arthur: three!'.lstrip('Arthur: ')
'ee!'

@MarcoGorelli MarcoGorelli added the Code Style Code style, linting, code_checks label Nov 15, 2022
@MarcoGorelli MarcoGorelli added this to the 2.0 milestone Nov 17, 2022
@MarcoGorelli
Copy link
Member Author

Thanks @twoertwein for reviewing!

@MarcoGorelli MarcoGorelli merged commit 4a5d77f into pandas-dev:main Nov 17, 2022
MarcoGorelli added a commit to MarcoGorelli/pandas that referenced this pull request Nov 18, 2022
* fixup b005 errors

* use sys.version_info check

* replace redefined func

* fixup

* use version_info check in _str_methods too

* move import

* put unnecessary else statement

Co-authored-by: MarcoGorelli <>
mliu08 pushed a commit to mliu08/pandas that referenced this pull request Nov 27, 2022
* fixup b005 errors

* use sys.version_info check

* replace redefined func

* fixup

* use version_info check in _str_methods too

* move import

* put unnecessary else statement

Co-authored-by: MarcoGorelli <>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Code Style Code style, linting, code_checks
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants