Repository navigation
Annotate more straightforward APIs in the stubs - #1271
Conversation
|
Awesome work @jonathanberthias , thank you! I went through the changes (both myself and with an agent), and all seem to correct! The stub test doesn't detect that new incomplete stubs are added, correct? Could we change this in a follow up PR? |
Yes that's correct, but I'm a little hesitant to add that check. It would force every contributor to add precise type hints in the stubs, but some parts of the API are still very complicated to type correctly and the stubs are still incomplete (enums, plugins, some array operations, ...). And also I'm not sure every one using this library is comfortable adding type annotations. But it's your call, I can work on it if you think it's helpful. |
|
Makes perfect sense! One baby step at a time, then :) |
Quite a few methods and attributes still use
Incomplete, even where the implementation makes their types fairly clear.Following #1220, this is another batch of straightforward annotations: mostly getters,
ModelandLPmethods, file paths, and matrix results. I also filled in concrete default values where possible.Deprecated APIs now use
@deprecated, and mypy checks for deprecated usage and unused ignores.The commits are split by topic, so reviewing them individually might be easier.
Part of #1072