]>
 
 
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 (from parent 1: 
5f9eb9e )
 
Fixes #250. 
 
+* trailing comma is now added to single imports that don't fit on a line (#250)
+
 
+def right_hand_split(  # noqa C901 
     line: Line, line_length: int, py36: bool = False, omit: Collection[LeafID] = ()
 ) -> Iterator[Line]:
     """Split line into many lines, starting with the last matching bracket pair.
     line: Line, line_length: int, py36: bool = False, omit: Collection[LeafID] = ()
 ) -> Iterator[Line]:
     """Split line into many lines, starting with the last matching bracket pair.
 
         # the matching `opening_bracket` wasn't available on `line` anymore.
         raise CannotSplit("No brackets found")
 
         # the matching `opening_bracket` wasn't available on `line` anymore.
         raise CannotSplit("No brackets found")
 
+    if line.is_import and len(body_leaves) == 1:
+        body_leaves.append(Leaf(token.COMMA, ","))
+
     # Build the new lines.
     for result, leaves in (head, head_leaves), (body, body_leaves), (tail, tail_leaves):
         for leaf in leaves:
     # Build the new lines.
     for result, leaves in (head, head_leaves), (body, body_leaves), (tail, tail_leaves):
         for leaf in leaves:
 
     Use,
 )
 from name_of_a_company.extremely_long_project_name.component.ttypes import (
     Use,
 )
 from name_of_a_company.extremely_long_project_name.component.ttypes import (
-    CuteLittleServiceHandlerFactoryyy
+    CuteLittleServiceHandlerFactoryyy, 
 )
 from name_of_a_company.extremely_long_project_name.extremely_long_component_name.ttypes import *
 
 )
 from name_of_a_company.extremely_long_project_name.extremely_long_component_name.ttypes import *