linopy icon indicating copy to clipboard operation
linopy copied to clipboard

Annotate Typing

Open FabianHofmann opened this issue 8 months ago • 0 comments

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

FabianHofmann avatar Oct 27 '23 12:10 FabianHofmann