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

Make sure --verbose trumps --quiet
[etc/vim.git] / tests / empty_lines.py
index 0edeb014a8f91e4bed3d9864e29798264f22847d..4c03e432383c174127c803dea8076488a09a8daf 100644 (file)
@@ -1,3 +1,7 @@
+"""Docstring."""
+
+
+# leading comment
 def f():
     NO = ''
     SPACE = ' '
 def f():
     NO = ''
     SPACE = ' '
@@ -44,9 +48,11 @@ def f():
                 syms.dictsetmaker,
             }:
                 return NO
                 syms.dictsetmaker,
             }:
                 return NO
+
 ###############################################################################
 # SECTION BECAUSE SECTIONS
 ###############################################################################
 ###############################################################################
 # SECTION BECAUSE SECTIONS
 ###############################################################################
+
 def g():
     NO = ''
     SPACE = ' '
 def g():
     NO = ''
     SPACE = ' '
@@ -89,6 +95,10 @@ def g():
 # output
 
 
 # output
 
 
+"""Docstring."""
+
+
+# leading comment
 def f():
     NO = ""
     SPACE = " "
 def f():
     NO = ""
     SPACE = " "
@@ -113,29 +123,23 @@ def f():
             return NO
 
         if prevp.type == token.EQUAL:
             return NO
 
         if prevp.type == token.EQUAL:
-            if (
-                prevp.parent
-                and prevp.parent.type in {
-                    syms.typedargslist,
-                    syms.varargslist,
-                    syms.parameters,
-                    syms.arglist,
-                    syms.argument,
-                }
-            ):
+            if prevp.parent and prevp.parent.type in {
+                syms.typedargslist,
+                syms.varargslist,
+                syms.parameters,
+                syms.arglist,
+                syms.argument,
+            }:
                 return NO
 
         elif prevp.type == token.DOUBLESTAR:
                 return NO
 
         elif prevp.type == token.DOUBLESTAR:
-            if (
-                prevp.parent
-                and prevp.parent.type in {
-                    syms.typedargslist,
-                    syms.varargslist,
-                    syms.parameters,
-                    syms.arglist,
-                    syms.dictsetmaker,
-                }
-            ):
+            if prevp.parent and prevp.parent.type in {
+                syms.typedargslist,
+                syms.varargslist,
+                syms.parameters,
+                syms.arglist,
+                syms.dictsetmaker,
+            }:
                 return NO
 
 
                 return NO
 
 
@@ -173,14 +177,11 @@ def g():
             return NO
 
         if prevp.type == token.EQUAL:
             return NO
 
         if prevp.type == token.EQUAL:
-            if (
-                prevp.parent
-                and prevp.parent.type in {
-                    syms.typedargslist,
-                    syms.varargslist,
-                    syms.parameters,
-                    syms.arglist,
-                    syms.argument,
-                }
-            ):
+            if prevp.parent and prevp.parent.type in {
+                syms.typedargslist,
+                syms.varargslist,
+                syms.parameters,
+                syms.arglist,
+                syms.argument,
+            }:
                 return NO
                 return NO