Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hi @Joao-Dionisio! This is the first PR to set some things up. It's 99% autogenerated stubs using
stubgen
(part of the Mypy project), and then I just fixed a couple easy things.This should be enough for LSPs/type checkers to know what exists in the PySCIPOpt package, but the types themselves are currently useless since nearly all methods take
*args, **kwargs
.I separated everything I did into small commits so you can see what I did exactly. The first commit is the raw output from
stubgen
, the others fix some things here and there but nothing important.One note on the organization: the stubs should mirror the structure of the final package. In this case, it means almost everything is in
scip.pyi
.I didn't include docstrings. I do have a script in my repo that parses the source Cython files with regexes and adds the docstrings to the stubs, but I recently found out about astral-sh/docstring-adder and I would like to see if that can be applied to this project. If so, it is a much more trustworthy approach since it relies on runtime objects and not on fragile manual parsing.
In any case, I'll tackle that in another PR 😄