diff --git a/bugbear.py b/bugbear.py index 177af11..010e095 100644 --- a/bugbear.py +++ b/bugbear.py @@ -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 diff --git a/tests/b950.py b/tests/b950.py index 942e50c..0dbded1 100644 --- a/tests/b950.py +++ b/tests/b950.py @@ -19,3 +19,8 @@ # This # almost_empty_line_too_long + +# Long empty line +""" + +"""