Python CP-SAT type hints · Pull Request #3668 · google/or-tools
Work in progress, opened as draft pull request.
Tasks:
- Custom types: Integral (same logic as
cmh.is_integral), Literal (IntVar+_NotBooleanVariable+Integral), Arc, etc - Run mypy on
ortools/sat/samples
Thank you for opening this review ! That's a great start.
I added some comments right now with additional typing from the top of my mind. But there are many more missing, even in other files 🤔
What would be the best way to help you cover all the definitions ?
Thanks for the help offer and suggestions! @oulianov
But I believe I just need some time to figure out the best type definitions for some of the more complex interfaces, eg:
- OnlyEnforceIf
- arcs (iterable of sequence of len 3)
- etc
And test them thoroughly.
ghost
marked this pull request as ready for review
ghost
marked this pull request as draft
ghost
marked this pull request as ready for review
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters