Skip to content

Commit

Permalink
mypy gets super confused when you declare a type for __all__
Browse files Browse the repository at this point in the history
no idea why, don't really care
  • Loading branch information
minrk committed May 31, 2022
1 parent e4f39e2 commit 33441bd
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
1 change: 0 additions & 1 deletion zmq/__init__.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ from . import backend, sugar
COPY_THRESHOLD: int
DRAFT_API: bool
__version__: str
__all__: List[str]

# mypy doesn't like overwriting symbols with * so be explicit
# about what comes from backend, not from sugar
Expand Down
3 changes: 2 additions & 1 deletion zmq/green/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,4 +42,5 @@
from zmq.green.device import device # type: ignore

__all__: List[str] = []
__all__.extend(_zmq.__all__)
# adding `__all__` to __init__.pyi gets mypy all confused
__all__.extend(_zmq.__all__) # type: ignore

0 comments on commit 33441bd

Please sign in to comment.