Path 1: 36238 calls (1.0)

'\n' (10741) '\r\n' (661) ' pass\n' (654) ' pass\n' (408) ' """\n' (341) '"""\n' (199) ' def __init__(self):\n' (169) ' pass\r\...

4 (876) 3 (858) 5 (778) 6 (764) 2 (763) 7 (726) 8 (679) 9 (659) 11 (605) 10 (601)

1def check_trailing_whitespace_ending(self, line: str, i: int) -> None:
2        """Check that there is no trailing white-space."""
3        # exclude \f (formfeed) from the rstrip
4        stripped_line = line.rstrip("\t\n\r\v ")
5        if line[len(stripped_line) :] not in ("\n", "\r\n"):
6            self.add_message(
7                "trailing-whitespace",
8                line=i,
9                col_offset=len(stripped_line),
10                confidence=HIGH,
11            )
            

Path 2: 5 calls (0.0)

'""" \n' (2) "print('some trailing whitespace') \n" (1) "print('trailing whitespace does not count towards the line length limit') ...

5 (1) 7 (1) 10 (1) 15 (1) 20 (1)

1def check_trailing_whitespace_ending(self, line: str, i: int) -> None:
2        """Check that there is no trailing white-space."""
3        # exclude \f (formfeed) from the rstrip
4        stripped_line = line.rstrip("\t\n\r\v ")
5        if line[len(stripped_line) :] not in ("\n", "\r\n"):
6            self.add_message(
7                "trailing-whitespace",
8                line=i,
9                col_offset=len(stripped_line),
10                confidence=HIGH,
11            )