linopy
linopy copied to clipboard
Annotate Typing
It seems to be a good way to use monkeytype for this:
pip install monkeytype
monkeytype run -m pytest linopy --doctest-modules test
monkeytype apply linopy.<module>
# see all modules with monkeytype list-modules
one needs to solve circular imports as well.
Afterwards we can add mypy to pre-commit
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.6.1 # Use the sha / tag you want to point at
hooks:
- id: mypy