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

Lines changed: 2 additions & 1 deletion
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)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy