]> git.madduck.net Git - etc/vim.git/blobdiff - tests/data/pattern_matching_style.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:

Convert `index.rst` and `license.rst` to markdown (#2852)
[etc/vim.git] / tests / data / pattern_matching_style.py
index c1c0aeedb70391de28543ef62ff013b29b2a9b16..8e18ce2ada6dda70dd8c82d2733034b807e44384 100644 (file)
@@ -6,10 +6,52 @@ match something:
     ): print(1)
     case c(
         very_complex=True,
-        perhaps_even_loooooooooooooooooooooooooooooooooooooong=-1
+        perhaps_even_loooooooooooooooooooooooooooooooooooooong=-1,
     ): print(2)
     case a: pass
 
+match(
+    arg # comment
+)
+
+match(
+)
+
+match(
+
+
+)
+
+case(
+    arg # comment
+)
+
+case(
+)
+
+case(
+
+
+)
+
+
+re.match(
+    something # fast
+)
+re.match(
+
+
+
+)
+match match(
+
+
+):
+    case case(
+        arg, # comment
+    ):
+        pass
+
 # output
 
 match something:
@@ -20,8 +62,30 @@ match something:
     ):
         print(1)
     case c(
-        very_complex=True, perhaps_even_loooooooooooooooooooooooooooooooooooooong=-1
+        very_complex=True,
+        perhaps_even_loooooooooooooooooooooooooooooooooooooong=-1,
     ):
         print(2)
     case a:
         pass
+
+match(arg)  # comment
+
+match()
+
+match()
+
+case(arg)  # comment
+
+case()
+
+case()
+
+
+re.match(something)  # fast
+re.match()
+match match():
+    case case(
+        arg,  # comment
+    ):
+        pass