mirror of
https://github.com/python/cpython.git
synced 2025-08-03 16:39:00 +00:00
unify some ast.argument's attrs; change Attribute column offset (closes #16795)
Patch from Sven Brauch.
This commit is contained in:
parent
c45e041bff
commit
cda75be02a
11 changed files with 250 additions and 235 deletions
|
@ -518,10 +518,10 @@ class Unparser:
|
|||
else: self.write(", ")
|
||||
self.write("*")
|
||||
if t.vararg:
|
||||
self.write(t.vararg)
|
||||
if t.varargannotation:
|
||||
self.write(t.vararg.arg)
|
||||
if t.vararg.annotation:
|
||||
self.write(": ")
|
||||
self.dispatch(t.varargannotation)
|
||||
self.dispatch(t.vararg.annotation)
|
||||
|
||||
# keyword-only arguments
|
||||
if t.kwonlyargs:
|
||||
|
@ -537,10 +537,10 @@ class Unparser:
|
|||
if t.kwarg:
|
||||
if first:first = False
|
||||
else: self.write(", ")
|
||||
self.write("**"+t.kwarg)
|
||||
if t.kwargannotation:
|
||||
self.write("**"+t.kwarg.arg)
|
||||
if t.kwarg.annotation:
|
||||
self.write(": ")
|
||||
self.dispatch(t.kwargannotation)
|
||||
self.dispatch(t.kwarg.annotation)
|
||||
|
||||
def _keyword(self, t):
|
||||
self.write(t.arg)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue