hyperliquid-dex / hyperliquid-python-sdk

SDK for Hyperliquid API trading with Python.
MIT License
238 stars 97 forks source link

Update mypy to 0.981 to support cross-platform development #62

Closed perplover closed 1 week ago

perplover commented 1 week ago

Make this project cross-compatible with linux development. This still keeps the project compatible for Python 3.8+

Previously, the error was:

Installing the current project: hyperliquid-python-sdk (0.7.1)
poetry run mypy --install-types --non-interactive ./
venv/lib/python3.10/site-packages/eth_utils/__init__.py:1: note: In module imported here,
./hyperliquid/utils/signing.py:5: note: ... from here:
venv/lib/python3.10/site-packages/pkg_resources-stubs/__init__.pyi:329:79: error: Positional-only parameters are only supported in Python 3.8
and greater  [syntax]
        def __init__(self, dist: Distribution, req: Requirement, /, *args: object) -> None: ...
                                                                                  ^
Found 1 error in 1 file (errors prevented further checking)
make: [Makefile:11: install] Error 2 (ignored)

Updating the package to resolve positional arguments:

Installing the current project: hyperliquid-python-sdk (0.7.1)
poetry run mypy --install-types --non-interactive ./
Success: no issues found in 36 source files

Link to all mypy patches in between version upgrades: