Path 1: 38875 calls (0.97)

TokenWrapper (38875)

2 (969) 4 (545) 6 (395) 5 (375) 3 (374) 7 (344) 9 (297) 8 (275) 15 (237) 13 (237)

';' (38875)

False (38875)

1def _last_token_on_line_is(tokens: TokenWrapper, line_end: int, token: str) -> bool:
2    return (
3        line_end > 0
4        and tokens.token(line_end - 1) == token
5        or line_end > 1
6        and tokens.token(line_end - 2) == token
7        and tokens.type(line_end - 1) == tokenize.COMMENT
8    )
            

Path 2: 1113 calls (0.03)

TokenWrapper (1113)

0 (1108) -1 (5)

';' (1113)

False (1113)

1def _last_token_on_line_is(tokens: TokenWrapper, line_end: int, token: str) -> bool:
2    return (
3        line_end > 0
4        and tokens.token(line_end - 1) == token
5        or line_end > 1
6        and tokens.token(line_end - 2) == token
7        and tokens.type(line_end - 1) == tokenize.COMMENT
8    )
            

Path 3: 209 calls (0.01)

TokenWrapper (209)

1 (209)

';' (209)

False (209)

1def _last_token_on_line_is(tokens: TokenWrapper, line_end: int, token: str) -> bool:
2    return (
3        line_end > 0
4        and tokens.token(line_end - 1) == token
5        or line_end > 1
6        and tokens.token(line_end - 2) == token
7        and tokens.type(line_end - 1) == tokenize.COMMENT
8    )
            

Path 4: 1 calls (0.0)

TokenWrapper (1)

56 (1)

';' (1)

True (1)

1def _last_token_on_line_is(tokens: TokenWrapper, line_end: int, token: str) -> bool:
2    return (
3        line_end > 0
4        and tokens.token(line_end - 1) == token
5        or line_end > 1
6        and tokens.token(line_end - 2) == token
7        and tokens.type(line_end - 1) == tokenize.COMMENT
8    )