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

Fix crash on long empty string #223

Merged
merged 1 commit into from Feb 28, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion bugbear.py
Expand Up @@ -72,7 +72,7 @@ def gen_line_based_checks(self):
continue

length = len(line) - 1
if length > 1.1 * self.max_line_length:
if length > 1.1 * self.max_line_length and line.strip():
# Special case long URLS and paths to follow pycodestyle.
# Would use the `pycodestyle.maximum_line_length` directly but
# need to supply it arguments that are not available so chose
Expand Down
5 changes: 5 additions & 0 deletions tests/b950.py
Expand Up @@ -19,3 +19,8 @@

# This
# almost_empty_line_too_long

# Long empty line
"""

"""