]> git.madduck.net Git - etc/vim.git/blobdiff - tests/data/pep_572_remove_parens.py

madduck's git repository

Every one of the projects in this repository is available at the canonical URL git://git.madduck.net/madduck/pub/<projectpath> — see each project's metadata for the exact URL.

All patches and comments are welcome. Please squash your changes to logical commits before using git-format-patch and git-send-email to patches@git.madduck.net. If you'd read over the Git project's submission guidelines and adhered to them, I'd be especially grateful.

SSH access, as well as push access can be individually arranged.

If you use my repositories frequently, consider adding the following snippet to ~/.gitconfig and using the third clone URL listed for each project:

[url "git://git.madduck.net/madduck/"]
  insteadOf = madduck:

Avoid crashing when the user has no homedir (#2814)
[etc/vim.git] / tests / data / pep_572_remove_parens.py
index 9a804859a09b92f321603004d79634044afb859b..9718d95b499de4e2c966de31d10433deb471e681 100644 (file)
@@ -33,6 +33,9 @@ def foo2(answer: (p := 42) = 5):
 
 lambda: (x := 1)
 
 
 lambda: (x := 1)
 
+a[(x := 12)]
+a[:(x := 13)]
+
 # we don't touch expressions in f-strings but if we do one day, don't break 'em
 f'{(x:=10)}'
 
 # we don't touch expressions in f-strings but if we do one day, don't break 'em
 f'{(x:=10)}'
 
@@ -43,6 +46,10 @@ def a():
     yield (a := 2)
     raise (c := 3)
 
     yield (a := 2)
     raise (c := 3)
 
+def this_is_so_dumb() -> (please := no):
+    pass
+
+
 # output
 if foo := 0:
     pass
 # output
 if foo := 0:
     pass
@@ -79,6 +86,9 @@ def foo2(answer: (p := 42) = 5):
 
 lambda: (x := 1)
 
 
 lambda: (x := 1)
 
+a[(x := 12)]
+a[:(x := 13)]
+
 # we don't touch expressions in f-strings but if we do one day, don't break 'em
 f"{(x:=10)}"
 
 # we don't touch expressions in f-strings but if we do one day, don't break 'em
 f"{(x:=10)}"
 
@@ -88,3 +98,8 @@ def a():
     await (b := 1)
     yield (a := 2)
     raise (c := 3)
     await (b := 1)
     yield (a := 2)
     raise (c := 3)
+
+
+def this_is_so_dumb() -> (please := no):
+    pass
+