Method: pylint.checkers.spelling.SpellingChecker.process_tokens
Calls: 1108, Exceptions: 0, Paths: 1Back
Path 1: 1108 calls (1.0)
list (1108)
None (1108)
1def process_tokens(self, tokens: list[tokenize.TokenInfo]) -> None:
2 if not self.initialized:
3 return
4
5 # Process tokens and look for comments.
6 for tok_type, token, (start_row, _), _, _ in tokens:
7 if tok_type == tokenize.COMMENT:
8 if start_row == 1 and token.startswith("#!/"):
9 # Skip shebang lines
10 continue
11 if token.startswith("# pylint:"):
12 # Skip pylint enable/disable comments
13 continue
14 self._check_spelling("wrong-spelling-in-comment", token, start_row)