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

Reword --pyi and --py36 documentation
[etc/vim.git] / tests / comments4.py
index 241b6cee72e11e8e8b8b6d937a2f5aaea10b0a68..944714df7bfc97da12028b72e10703dd42b6bdf2 100644 (file)
@@ -61,16 +61,37 @@ class C:
 
 def foo(list_a, list_b):
     results = (
-        User.query.filter(User.foo == "bar").filter(  # Because foo.
+        User.query.filter(User.foo == "bar")
+        .filter(  # Because foo.
             db.or_(User.field_a.astext.in_(list_a), User.field_b.astext.in_(list_b))
-        ).filter(
-            User.xyz.is_(None)
         )
+        .filter(User.xyz.is_(None))
         # Another comment about the filtering on is_quux goes here.
-        .filter(db.not_(User.is_pending.astext.cast(db.Boolean).is_(True))).order_by(
-            User.created_at.desc()
-        ).with_for_update(
-            key_share=True
-        ).all()
+        .filter(db.not_(User.is_pending.astext.cast(db.Boolean).is_(True)))
+        .order_by(User.created_at.desc())
+        .with_for_update(key_share=True)
+        .all()
     )
     return results
+
+
+def foo2(list_a, list_b):
+    # Standalone comment reasonably placed.
+    return (
+        User.query.filter(User.foo == "bar")
+        .filter(
+            db.or_(User.field_a.astext.in_(list_a), User.field_b.astext.in_(list_b))
+        )
+        .filter(User.xyz.is_(None))
+    )
+
+
+def foo3(list_a, list_b):
+    return (
+        # Standlone comment but weirdly placed.
+        User.query.filter(User.foo == "bar")
+        .filter(
+            db.or_(User.field_a.astext.in_(list_a), User.field_b.astext.in_(list_b))
+        )
+        .filter(User.xyz.is_(None))
+    )