Skip to content

Commit

Permalink
Add an undocumented mypyc_attr decorator (#12)
Browse files Browse the repository at this point in the history
This is an (for-now) undocumented annotation to allow specifying
various hints to mypyc. `trait` could have used this instead of
being its own thing.
  • Loading branch information
msullivan authored Sep 21, 2019
1 parent 6252ecb commit 1cd4b86
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions mypy_extensions.py
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,10 @@ def trait(cls):
return cls


def mypyc_attr(*attrs, **kwattrs):
return lambda x: x


# TODO: We may want to try to properly apply this to any type
# variables left over...
class _FlexibleAliasClsApplied:
Expand Down

0 comments on commit 1cd4b86

Please sign in to comment.