diff options
Diffstat (limited to 'Lib/ast.py')
-rw-r--r-- | Lib/ast.py | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -332,6 +332,8 @@ def get_source_segment(source, node, *, padded=False): be padded with spaces to match its original position. """ try: + if node.end_lineno is None or node.end_col_offset is None: + return None lineno = node.lineno - 1 end_lineno = node.end_lineno - 1 col_offset = node.col_offset |