Expose type annotations#424
Conversation
|
Hey @Dreamsorcerer thanks for bringing my attention to this file. Unfortunately, I can't reproduce the error your change tries to fix. What I've done: # from within the SDK's repository
uv venv venv
source venv/bin/activate
uv build .
uv pip install dist/python_kraken_sdk-3.2.8.dev10-py3-none-any.whl
mkdir foo; cd foo
echo "from kraken.spot import SpotClient" > test_types.py
uv pip install mypy
mypy test_types.py
# output:
Success: no issues found in 1 source fileSo there seems to be no error here but I found that PEP 561 supports your argument. Could you please provide a minimal reproducible example so that I can verify your changes? |
|
Try |
|
Actually I can reproduce trivially without. I can only assume you've somehow managed to get the kraken module on to MYPYPATH, which would end up type checking it without a marker. |
Yeah, this way it works. I could confirm that adding this file resolves the issue. Thanks! |
This file is needed to tell tools that the library is typed and can be used for type checking. e.g. Mypy currently produces an error: Skipping analyzing "kraken.spot": module is installed, but missing library stubs or py.typed marker.