-
-
Notifications
You must be signed in to change notification settings - Fork 63
Closed
Description
Currently, an object with either lineno or endlineno being None will return the whole module lines as source. This only makes sense for modules (modules don't have "line numbers", so their lineno and endlineno attributes are None). For classes, functions and attributes, it really feels wrong to return the whole module's code. Instead, we should return an empty list.
So instead of this:
if self.lineno is None or self.endlineno is None:
return lines...we should do this:
if self.lineno is None or self.endlineno is None:
return []This would have at least prevented mkdocstrings/python#163.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels