Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Explicitly re-export names from top-level package using __all__ #981

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

mthuurne
Copy link

@mthuurne mthuurne commented Jan 2, 2024

This avoids the re-exports from being flagged as errors when a project that uses Invoke is checked using mypy --no-implicit-reexport.

It also obsoletes all flake8 suppressions in __init__.py.

I assumed the following names should be re-exported:

  • every imported name that wasn't used in __init__.py itself
  • context.Context and runners.Result

I assumed the following names should not be re-exported:

  • typing.Any and typing.Optional

This avoids the re-exports from being flagged as errors when a project
that uses Invoke is checked using `mypy --no-implicit-reexport`.

It also obsoletes all flake8 suppressions in `__init__.py`.
@ogenstad
Copy link

Was also going to open a PR for this. I'd move the __all__ so it's below the imports though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants