mirror of
https://gitflic.ru/project/openide/openide.git
synced 2025-12-14 18:05:27 +07:00
(cherry picked from commit c8bfbc4149b840033f9c24a9190860abdd0ff6a8) IJ-CR-11891 GitOrigin-RevId: 3ce6f98d5b031c705c461505a5c307c0241ce97e
29 lines
668 B
Python
29 lines
668 B
Python
foo(x = y := f(x)) # INVALID
|
|
foo(x=(y := f(x))) # Valid, though probably confusing
|
|
|
|
def foo(answer = p := 42): # INVALID
|
|
pass
|
|
def foo(answer=(p := 42)): # Valid, though not great style
|
|
pass
|
|
|
|
def foo(answer: p := 42 = 5): # INVALID
|
|
pass
|
|
def foo(answer: (p := 42) = 5): # Valid, but probably never useful
|
|
pass
|
|
|
|
(lambda: x := 1) # INVALID
|
|
lambda: (x := 1) # Valid, but unlikely to be useful
|
|
|
|
result_dict = {a := 1 : b := 2} # INVALID
|
|
result_dict = {a := 1 : (b := 2)} # INVALID
|
|
result_dict = {(a := 1) : (b := 2)}
|
|
|
|
assert a := 1 # INVALID
|
|
assert (a := 1)
|
|
|
|
with f := open('file.txt'): # INVALID
|
|
pass
|
|
|
|
with (f := open('file.txt')):
|
|
pass
|