File tree Expand file tree Collapse file tree 2 files changed +10
-1
lines changed Expand file tree Collapse file tree 2 files changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -1329,7 +1329,7 @@ def ignore(self, node):
1329
1329
# "expr" type nodes
1330
1330
BOOLOP = UNARYOP = IFEXP = SET = \
1331
1331
REPR = ATTRIBUTE = SUBSCRIPT = \
1332
- STARRED = NAMECONSTANT = handleChildren
1332
+ STARRED = NAMECONSTANT = NAMEDEXPR = handleChildren
1333
1333
1334
1334
def _handle_string_dot_format (self , node ):
1335
1335
try :
Original file line number Diff line number Diff line change @@ -1754,6 +1754,15 @@ def test_f_string(self):
1754
1754
print(f'\x7b 4*baz\N{RIGHT CURLY BRACKET} ')
1755
1755
''' )
1756
1756
1757
+ @skipIf (version_info < (3 , 8 ), 'new in Python 3.8' )
1758
+ def test_assign_expr (self ):
1759
+ """Test PEP 572 assignment expressions are treated as usage / write."""
1760
+ self .flakes ('''
1761
+ from foo import y
1762
+ print(x := y)
1763
+ print(x)
1764
+ ''' )
1765
+
1757
1766
1758
1767
class TestStringFormatting (TestCase ):
1759
1768
You can’t perform that action at this time.
0 commit comments