Skip to content

cp-sat: fix typos and improve docstrings in cp_model.py#5149

Open
chripiermarini wants to merge 1 commit intogoogle:mainfrom
chripiermarini:feature/fix-docstrings
Open

cp-sat: fix typos and improve docstrings in cp_model.py#5149
chripiermarini wants to merge 1 commit intogoogle:mainfrom
chripiermarini:feature/fix-docstrings

Conversation

@chripiermarini
Copy link
Copy Markdown

Hello, I wanted to started contributing to or-tools as I use it daily and I would like to help :)

  1. Fixed broken doc link #lineacp_model.LinearExpr → #cp_model.LinearExpr
  2. Removed duplicate UNKNOWN assignment
  3. Fixed typo "determistic" → "deterministic" in CpSolverSolutionCallback.deterministic_time docstring
  4. Fixed float_value() docstring saying "An integer value" → "A float value" (copy-paste error)
  5. Added missing input validation to add_reservoir_constraint — its docstring promised ValueError raises for invalid min_level/max_level/empty times, but the code had none (unlike its sibling add_reservoir_constraint_with_active which validates properly)
  6. Fixed grammar "an linear" → "a linear" in CpSolverSolutionCallback.value() docstring
  7. Added missing docstrings to has_objective() and clear_objective()

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant