Skip to content

Commit b56d9fa

Browse files
committed
kwonlyargs
1 parent 5a9d570 commit b56d9fa

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

python/asthelper.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import ast
2+
from itertools import chain
23

34

45
class RaiseNameCollector(ast.NodeVisitor):
@@ -83,7 +84,7 @@ def _handle_functions(self, node):
8384
self.raises |= new_visitor.raises
8485

8586
if self.parent:
86-
for arg in node.args.args:
87+
for arg in chain(node.args.args, node.args.kwonlyargs):
8788
type_hint = None
8889
if arg.annotation is not None:
8990
type_hint = ast.unparse(arg.annotation)

0 commit comments

Comments
 (0)