class documentation

class _CommentFinder: (source)

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): (source)

Undocumented

Parameters
tokens:t.Sequence[t.Tuple[int, str, str]]Undocumented
comment_tags:t.Sequence[str]Undocumented
def find_backwards(self, offset): (source)

Undocumented

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

Undocumented

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

Undocumented

last_lineno: int = (source)

Undocumented

offset = (source)

Undocumented

tokens = (source)

Undocumented