Open Maroloccio opened 4 years ago
Looks like a good idea... Anyone willing to help out here?
Is it just set typehints to the whole code? I can do it if it is the issue.
EDIT: ok, I went to check mypy errors and I think I got the real issue:
asciimatics/paths.py:9: error: Skipping analyzing 'future.utils': found module but no type hints or library stubs
asciimatics/paths.py:32: error: Unsupported dynamic base class "with_metaclass"
asciimatics/paths.py:187: error: Unsupported dynamic base class "with_metaclass"
Unfotunately, for this one, it is not possible to install future-stubs
because it depends on python-future
, which does not exist anymore (apparently it was renamed to simply future
).
A lot of mypy errors are from Py2 compatibility code. Since there's no more official support to Py2 since the beginning of this year, what if asciimatics dropped support to it, sticking only with Py3?
EDIT2: Ok, maybe dropping support just because typehinting is not working as expected seems overkill.
But updates: I'm getting there, I am! Found this and now the issue makes 100% sense to me: https://mypy.readthedocs.io/en/stable/stubs.html
As I understand it, that is just an error saying that the stubs for futufe are missing and I'm not convinced that future-stubs is maintained from the fact it can't be installed.
Did you try any of the workarounds here (https://mypy.readthedocs.io/en/stable/running_mypy.html) - e.g. generating your own future stub files with stubgen?
As I understand it, that is just an error saying that the stubs for futufe are missing and I'm not convinced that future-stubs is maintained from the fact it can't be installed.
Did you try any of the workarounds here (https://mypy.readthedocs.io/en/stable/running_mypy.html) - e.g. generating your own future stub files with stubgen?
It did work :) Submitted my current WIP
At the moment the lack of type hinting requires turning off mypy checks. It would be helpful to offer library stubs.