-
Notifications
You must be signed in to change notification settings - Fork 62
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
Mypy no_implicit_reexport
x testfixtures
#178
Comments
@g-as - Would this problem be resolved if the I'm afraid I don't have time or energy to appease mypy on the testfixtures project. The type annotations that are there are intended to be helpful documentation and off aid to IDEs... FWIW, that |
Hi, from my understanding, My use
a.py
from some_lib import some_stuff
use_some_suff() Works, but not necessarily intended: b.py
from a import some_stuff If I indeed do want to "reexport" explicitely a.py
from some_lib import some_stuff as some_stuff
use_some_suff() The flag helps tracking that. In any case, I can totally understand if you do not want to go through with this. As mentioned, the conf allows you to disable some checks for some modules. So feel free to close if you want to leave it at that. |
Well, if there had been no |
I think so but let me test. |
Tested, no |
Okay, so the solution for me is to remove the |
Removed in 42b73cf and the 7.0.4 release. |
I'd rather you did not then. |
LOL. |
Thanks anyways. |
Sorry, but until mypy matures or a better tool comes along that isn't written in Javascript (oh, the irony!), and the minimum Python version I want to support has this mature support, I haven't got the time or energy to appease it. My experience has been that IDEs, certainly the JetBrains ones, will use the annotations even without the Should anyone (@asqui ?) be interested in putting a PR together which makes everything happy, and without a hard dependency on the typing-extensions package, I'd definitely try and get it merged. |
Hi,
when enabling
no_implicit_reexport
, mypy displays:It happens whether
from testfixtures import compare
orimport testfixures; testfixtures.compare(..., ...)
.According to the docs, you either have to have in
__init__.py
from testfixtures.comparison import compare as compare
or__all__ = (..., "compare", ...)
.Would you be willing to modify the
__init__.py
in order to address this?If so, I can draft a PR depending on which way you prefer (either with
__all__
or withfrom foo import bar as bar
).Some context/examples on this particular issue:
python/mypy#10198
konradhalas/dacite#133
konradhalas/dacite@a7834ba
pallets/quart@c219d96
In any case, a way to disable this
mypy
flag only fortestfixtures
is with:The text was updated successfully, but these errors were encountered: