mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-26 13:51:30 +08:00
Improve typing for ast nodes which represent assignment behaviour (#9326)
This commit is contained in:
@@ -104,14 +104,14 @@ class Assign(stmt):
|
||||
class AugAssign(stmt):
|
||||
if sys.version_info >= (3, 10):
|
||||
__match_args__ = ("target", "op", "value")
|
||||
target: expr
|
||||
target: Name | Attribute | Subscript
|
||||
op: operator
|
||||
value: expr
|
||||
|
||||
class AnnAssign(stmt):
|
||||
if sys.version_info >= (3, 10):
|
||||
__match_args__ = ("target", "annotation", "value", "simple")
|
||||
target: expr
|
||||
target: Name | Attribute | Subscript
|
||||
annotation: expr
|
||||
value: expr | None
|
||||
simple: int
|
||||
@@ -355,7 +355,7 @@ if sys.version_info >= (3, 8):
|
||||
class NamedExpr(expr):
|
||||
if sys.version_info >= (3, 10):
|
||||
__match_args__ = ("target", "value")
|
||||
target: expr
|
||||
target: Name
|
||||
value: expr
|
||||
|
||||
class Attribute(expr):
|
||||
|
||||
Reference in New Issue
Block a user