We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d3b1874 commit e64c747Copy full SHA for e64c747
src/tap/utils.py
@@ -264,6 +264,11 @@ def get_subsequent_assign_lines(source_cls: str) -> Set[int]:
264
assign_lines = set()
265
for node in cls_body.body:
266
if isinstance(node, (ast.Assign, ast.AnnAssign)):
267
+ # Check if the end line number is found
268
+ if node.end_lineno is None:
269
+ warnings.warn(parse_warning)
270
+ return set()
271
+
272
# Get line number of assign statement excluding the first line (and minus 1 for the if statement)
273
assign_lines |= set(range(node.lineno, node.end_lineno))
274
0 commit comments