Conversation
this should enable mypy to analyse the package
|
This does not fix the issue for some reason - even after upgrading mypy and clearing the cache. Following https://mypy.readthedocs.io/en/stable/installed_packages.html#creating-pep-561-compatible-packages, it might be neccessary to set |
|
hm, thats anoying. I will look into this some more... |
This should finally allow mypy to find the stubs
|
@phoenixr-codes it should work now, could you please try again? Use: pip install -U --pre readchar==4.0.4.dev1 |
|
Still does not work. The Going to the site packages and looking at some library's files, shows that some of them I have managed to create a library which mypy recognizes as typed by using this [build-system]
requires = ["setuptools", "setuptools-scm"]
build-backend = "setuptools.build_meta"
[project]
name = "typing_mypy_test"
version = "0.0.2"
[tool.setuptools.package-data]
typing_mypy_test = ["py.typed"]
[tool.setuptools]
zip-safe = false# file: main.py
def add(a: float, b: float) -> float:
return a + bDirectory Structure (after |
|
But I made sure that this time the file is included in both the But thanks for the hints from other packages, I will look how they handle it |
|
Ok I found the problem. My release-pipeline is a bust and actually always releases If you have the time you could try installing directly from the repo, like this: pip install -U git+https://github.com/magmax/[email protected]I will fix the pipeline... |
|
@phoenixr-codes The pipeline is fixed and the newest pre-release version now actually containes the changes (also in the versions pushed to pypi). So installing this should work: pip install -U --pre readchar==4.0.4.dev2 |
this should enable mypy to analyse the package and fix #100
@phoenixr-codes can you please confirm this fixes the issue? Use this to install the pre-release version: