Skip to content

Commit

Permalink
I should make pyanalyze understand version checks
Browse files Browse the repository at this point in the history
  • Loading branch information
JelleZijlstra committed Jan 18, 2023
1 parent 3af6ba1 commit 38eda90
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions stubdefaulter.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ def leave_Param(

def get_end_lineno(node: ast.FunctionDef | ast.AsyncFunctionDef) -> int:
if sys.version_info >= (3, 8):
assert hasattr(node, "end_lineno")
assert node.end_lineno is not None
return node.end_lineno
else:
Expand Down

0 comments on commit 38eda90

Please sign in to comment.