Skip to content

__init__.py is not reexporting its members #703

Open
@sk-

Description

@sk-

Once #699 is fixed, we will still have some typing issues because __init__.py is not defining __all__ or reexporting the members. See https://mypy.readthedocs.io/en/stable/command_line.html#cmdoption-mypy-no-implicit-reexport for more details.

Without this, mypy produces the following error:

error: Module "django_rq" does not explicitly export attribute "get_queue"  [attr-defined]

This can be solved by just adding to __init__.py the following code:

__all__ = [
  "enqueue",
  "get_connection",
  "get_queue",
  "get_scheduler"
  "get_worker",
  "job",
  "VERSION",
]

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions