]> 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:

Put missing blank lines after return statements.
authorŁukasz Langa <lukasz@langa.pl>
Fri, 17 Aug 2018 17:29:19 +0000 (10:29 -0700)
committerŁukasz Langa <lukasz@langa.pl>
Fri, 17 Aug 2018 17:29:19 +0000 (10:29 -0700)
black.py

index 9b363d5041f2528c063fc70aadc14937f37bb781..46f9c92cd1858c3cc708d0bf47a207c47873e705 100644 (file)
--- a/black.py
+++ b/black.py
@@ -2545,6 +2545,7 @@ def format_float_or_int_string(text: str, allow_underscores: bool) -> str:
     """Formats a float string like "1.0"."""
     if "." not in text:
         return format_int_string(text, allow_underscores)
     """Formats a float string like "1.0"."""
     if "." not in text:
         return format_int_string(text, allow_underscores)
+
     before, after = text.split(".")
     before = format_int_string(before, allow_underscores) if before else "0"
     after = format_int_string(after, allow_underscores) if after else "0"
     before, after = text.split(".")
     before = format_int_string(before, allow_underscores) if before else "0"
     after = format_int_string(after, allow_underscores) if after else "0"
@@ -2558,10 +2559,12 @@ def format_int_string(text: str, allow_underscores: bool) -> str:
     """
     if not allow_underscores:
         return text
     """
     if not allow_underscores:
         return text
+
     text = text.replace("_", "")
     if len(text) <= 6:
         # No underscores for numbers <= 6 digits long.
         return text
     text = text.replace("_", "")
     if len(text) <= 6:
         # No underscores for numbers <= 6 digits long.
         return text
+
     return format(int(text), "3_")
 
 
     return format(int(text), "3_")