We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents fc2c2ba + 035b52f commit c8e36a0Copy full SHA for c8e36a0
pycodestyle.py
@@ -233,9 +233,11 @@ def trailing_whitespace(physical_line):
233
W291: spam(1) \n#
234
W293: class Foo(object):\n \n bang = 12
235
"""
236
- physical_line = physical_line.rstrip('\n') # chr(10), newline
237
- physical_line = physical_line.rstrip('\r') # chr(13), carriage return
238
- physical_line = physical_line.rstrip('\x0c') # chr(12), form feed, ^L
+ # Strip these trailing characters:
+ # - chr(10), newline
+ # - chr(13), carriage return
239
+ # - chr(12), form feed, ^L
240
+ physical_line = physical_line.rstrip('\n\r\x0c')
241
stripped = physical_line.rstrip(' \t\v')
242
if physical_line != stripped:
243
if stripped:
0 commit comments