]>
git.madduck.net Git - etc/vim.git/commitdiff
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:
summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (parent:
df965b0 )
Fixes #385
### 18.8b0
* fix parsing of `__future__` imports with renames (#389)
### 18.8b0
* fix parsing of `__future__` imports with renames (#389)
+* fix scope of `# fmt: off` when directly preceding `yield` and other nodes (#385)
syms.testlist_gexp,
syms.testlist_star_expr,
}
syms.testlist_gexp,
syms.testlist_star_expr,
}
-SURROUNDED_BY_BRACKETS = {
- syms.typedargslist,
- syms.arglist,
- syms.subscriptlist,
- syms.vfplist,
- syms.import_as_names,
- syms.yield_expr,
- syms.testlist_gexp,
- syms.testlist_star_expr,
- syms.listmaker,
- syms.dictsetmaker,
-}
TEST_DESCENDANTS = {
syms.test,
syms.lambdef,
TEST_DESCENDANTS = {
syms.test,
syms.lambdef,
if parent.type == syms.file_input:
break
if parent.type == syms.file_input:
break
- if parent.type in SURROUNDED_BY_ BRACKETS:
+ if parent.prev_sibling is not None and parent.prev_sibling.type in BRACKETS:
# fmt: off
key: 'value',
}
# fmt: off
key: 'value',
}
+
+def subscriptlist():
+ atom[
+ # fmt: off
+ 'some big and',
+ 'complex subscript',
+ # fmt: on
+ goes + here, andhere,
+ ]
+
+def import_as_names():
+ # fmt: off
+ from hello import a, b
+ 'unformatted'
+ # fmt: on
+
+def testlist_star_expr():
+ # fmt: off
+ a , b = *hello
+ 'unformatted'
+ # fmt: on
+
+def yield_expr():
+ # fmt: off
+ yield hello
+ 'unformatted'
+ # fmt: on
+ 'formatted'
+ # fmt: off
+ ( yield hello )
+ 'unformatted'
+ # fmt: on
+
def example(session):
# fmt: off
result = session\
def example(session):
# fmt: off
result = session\
xxxxxxxxxx_xxxxxxxxxxx_xxxxxxx_xxxxxxxxx=5
)
# fmt: off
xxxxxxxxxx_xxxxxxxxxxx_xxxxxxx_xxxxxxxxx=5
)
# fmt: off
# No formatting to the end of the file
l=[1,2,3]
d={'a':1,
# No formatting to the end of the file
l=[1,2,3]
d={'a':1,
+def subscriptlist():
+ atom[
+ # fmt: off
+ 'some big and',
+ 'complex subscript',
+ # fmt: on
+ goes + here,
+ andhere,
+ ]
+
+
+def import_as_names():
+ # fmt: off
+ from hello import a, b
+ 'unformatted'
+ # fmt: on
+
+
+def testlist_star_expr():
+ # fmt: off
+ a , b = *hello
+ 'unformatted'
+ # fmt: on
+
+
+def yield_expr():
+ # fmt: off
+ yield hello
+ 'unformatted'
+ # fmt: on
+ "formatted"
+ # fmt: off
+ ( yield hello )
+ 'unformatted'
+ # fmt: on
+
+
def example(session):
# fmt: off
result = session\
def example(session):
# fmt: off
result = session\
xxxxxxxxxx_xxxxxxxxxxx_xxxxxxx_xxxxxxxxx=5,
)
# fmt: off
xxxxxxxxxx_xxxxxxxxxxx_xxxxxxx_xxxxxxxxx=5,
)
# fmt: off
# No formatting to the end of the file
l=[1,2,3]
d={'a':1,
# No formatting to the end of the file
l=[1,2,3]
d={'a':1,