Skip to content

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

@ogenstad
Copy link

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

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`.
@mthuurne
Copy link
Author

I updated this PR to resolve conflicts with the current main branch.

Fixes: #945, #1013

@mthuurne
Copy link
Author

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

In PEP8 style it should be placed above regular imports. I don't know if Invoke follows PEP8, but it seemed like a safe starting point. I don't mind moving it if a maintainer requests it.

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