mvantellingen / python-zeep

A Python SOAP client
http://docs.python-zeep.org
Other
1.87k stars 579 forks source link

Use explicit reexport #1342

Closed Dreamsorcerer closed 1 year ago

Dreamsorcerer commented 1 year ago

If a user disable implicit reexport in Mypy, then they will get errors when trying to use anything in the zeep module. https://mypy.readthedocs.io/en/stable/config_file.html#confval-implicit_reexport

This PR disables implicit reexport and updates the code to not introduce errors for users.

Also, just fixed a bunch of type errors while I was there.

Currently (mypy 0.981) need to run mypy --enable-recursive-aliases, but in a future version that will be enabled by default and can just run mypy.

mvantellingen commented 1 year ago

Hi, thanks for the PR. I actually prefer the __all__ approach as that feels more how Python always does it. Is it possible to do that instead?

Dreamsorcerer commented 1 year ago

Yes, see the examples: https://mypy.readthedocs.io/en/stable/command_line.html?highlight=reexport#cmdoption-mypy-no-implicit-reexport