madduck's git repository

Every one of the projects in this repository is available at the canonical URL git://<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 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://"]
  insteadOf = madduck:

Stop changing return type annotations to tuples (#2384)
authorRichard Si <>
Thu, 26 Aug 2021 01:32:27 +0000 (21:32 -0400)
committerGitHub <>
Thu, 26 Aug 2021 01:32:27 +0000 (18:32 -0700)
Stop changing return type annotations to tuples (#2384)

This fixes a bug where a trailing comma would be added to a
parenthesized return annotation changing its type to a tuple.
Here's one case where this bug shows up:

def spam() -> (

The root problem was that the type annotation was treated as if it was
a parameter & import list (is_body=True to linegen::bracket_split_build_line)
where a trailing comma is usually fine. Now there's another check in the
aforementioned function to make sure the body it's operating on isn't
a return annotation before truly adding a trailing comma.