8000 fix(ortools): use snake_case CP-SAT API to satisfy mypy by devin-ai-integration[bot] · Pull Request #109 · dominicusin/package-maximizer · GitHub
[go: up one dir, main page]

Skip to content

fix(ortools): use snake_case CP-SAT API to satisfy mypy - #109

Merged
dominicusin merged 2 commits into
mainfrom
devin/1791936100-ortools-snake-case
Oct 18, 2026
Merged

dominicusin merged 2 commits into
mainfrom
devin/1791936100-ortools-snake-case

Conversation

@devin-ai-integration
Copy link
Copy Markdown
Contributor

Summary

mypy package_maximizer reported 8 attr-defined errors in solvers/ortools_solver.py because the OR-Tools type stubs only know the snake_case CpModel/CpSolver API (NewBoolVar → new_bool_var, Maximize → maximize, AddBoolOr → add_bool_or, AddImplication → add_implication, Solve → solve, Value → value, Not() → negated()).

  • ORToolsSolver.solve() and solve_with_weights() now use the snake_case methods. Behaviour is unchanged.
  • The snake_case API exists since OR-Tools 9.8, so the ortools pin in pyproject.toml and requirements-solvers.txt is raised from >=9.0.0 to >=9.8.0.

mypy package_maximizer is now clean: Success: no issues found in 44 source files.

Checks

  • make test passes (894 passed; ortools 9.15 locally, solve/solve_with_weights smoke-tested)
  • flake8 critical check passes; mypy clean
  • docs updated if behavior changed (no behavior change)

Link to Devin session: https://app.devin.ai/sessions/7a195999dfd146d48fbc98f4bab6707a
Open in Devin Desktop: https://app.devin.ai/desktop/session/7a195999dfd146d48fbc98f4bab6707a?variant=devin
Requested by: @dominicusin

Co-Authored-By: dominicusin <dominicusin@yahoo.com>
@devin-ai-integration
Copy link
Copy Markdown
Contributor Author

I'll fix CI failures and address comments from users with write access. I'll skip comments containing "(aside)".

  • Disable automatic comment, CI, and merge conflict monitoring

@coderabbitai
coderabbitai Bot commented Oct 13, 2026 •
Copy link
Copy Markdown

Important

Review skipped

Bot user detected.

To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 1e3b82c5-bbdd-4b5d-967c-d52aa7d35316

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@read-the-docs-community
read-the-docs-community Bot commented Oct 13, 2026 •
Copy link
Copy Markdown

Documentation build overview

📚 package-maximizer | 🛠️ Build #35216681 | 📁 Comparing 6994d4c against latest (61e642a)

  🔍 Preview build  

No files changed.

@dominicusin
dominicusin enabled auto-merge (squash) October 18, 2026 00:08
@dominicusin
dominicusin merged commit 86d67b0 into main Oct 18, 2026
16 checks passed
@dominicusin
dominicusin deleted the devin/1791936100-ortools-snake-case branch October 18, 2026 00:11
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

0