class documentation

class _CommentFinder:

View In Hierarchy

Helper class to find comments in a token stream. Can only find comments for gettext calls forwards. Once the comment from line 4 is found, a comment for line 1 will not return a usable value.
Method __init__ Undocumented
Method find​_backwards Undocumented
Method find​_comments Undocumented
Instance Variable comment​_tags Undocumented
Instance Variable last​_lineno Undocumented
Instance Variable offset Undocumented
Instance Variable tokens Undocumented
def __init__(self, tokens, comment_tags):

Undocumented

Parameters
tokens:t.Sequence[t.Tuple[int, str, str]]Undocumented
comment​_tags:t.Sequence[str]Undocumented
def find_backwards(self, offset):

Undocumented

Parameters
offset:intUndocumented
Returns
t.List[str]Undocumented
def find_comments(self, lineno):

Undocumented

Parameters
lineno:intUndocumented
Returns
t.List[str]Undocumented
comment_tags =

Undocumented

last_lineno: int =

Undocumented

offset =

Undocumented

tokens =

Undocumented