]>
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:
9372dc8 )
Fixes #532.
* cache is now populated when `--check` is successful for a file which speeds up
consecutive checks of properly formatted unmodified files (#448)
* cache is now populated when `--check` is successful for a file which speeds up
consecutive checks of properly formatted unmodified files (#448)
+* fixed mangling [pweave](http://mpastell.com/pweave/) and
+ [Spyder IDE](https://pythonhosted.org/spyder/) special comments (#532)
+
* fixed unstable formatting when unpacking big tuples (#267)
* fixed parsing of `__future__` imports with renames (#389)
* fixed unstable formatting when unpacking big tuples (#267)
* fixed parsing of `__future__` imports with renames (#389)
def make_comment(content: str) -> str:
"""Return a consistently formatted comment from the given `content` string.
def make_comment(content: str) -> str:
"""Return a consistently formatted comment from the given `content` string.
- All comments (except for "##", "#!", "#:") should have a single space between
- the hash sign and the content.
+ All comments (except for "##", "#!", "#:", '#'", "#%%") should have a single
+ space between the hash sign and the content.
If `content` didn't start with a hash sign, one is provided.
"""
If `content` didn't start with a hash sign, one is provided.
"""
if content[0] == "#":
content = content[1:]
if content[0] == "#":
content = content[1:]
- if content and content[0] not in " !:#":
+ if content and content[0] not in " !:#'% ":
content = " " + content
return "#" + content
content = " " + content
return "#" + content
"""Docstring for instance attribute spam."""
"""Docstring for instance attribute spam."""
+#' <h1>This is pweave!</h1>
+
+
@fast(really=True)
async def wat():
async with X.open_async() as x: # Some more comments
@fast(really=True)
async def wat():
async with X.open_async() as x: # Some more comments
+# The percent-percent comments are Spyder IDE cells.
+
+#%%
def func():
x = """
a really long string
def func():
x = """
a really long string
# shared between sub-exceptions are not omitted
_seen=set(_seen),
)
# shared between sub-exceptions are not omitted
_seen=set(_seen),
)
+
+
+#%%
\ No newline at end of file