Add __all__ to please mypy (#1928)

* Add __all__ to please mypy

mypy complains with "implicit reexport disabled" when importing directly from the main `rq` package, eg.

from rq import Worker

Without adding an `__all__` to `__init__.py`, mypy would expect it this way:

from rq.worker import Worker

This PR does add the `__all__` to `__init__.py` to please mypy.

* Lint
main
Dominik Aumayr 2 years ago committed by GitHub
parent c6b0409fca
commit 2faba2cea9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -5,4 +5,19 @@ from .queue import Queue
from .version import VERSION from .version import VERSION
from .worker import SimpleWorker, Worker from .worker import SimpleWorker, Worker
__all__ = [
"Connection",
"get_current_connection",
"pop_connection",
"push_connection",
"Callback",
"Retry",
"cancel_job",
"get_current_job",
"requeue_job",
"Queue",
"SimpleWorker",
"Worker",
]
__version__ = VERSION __version__ = VERSION

Loading…
Cancel
Save