Skip to content

Return self in model_validator for BoreschRestraintSettings - #2217

Open
IAlibay wants to merge 1 commit into
mainfrom
issue-2216
Open

IAlibay wants to merge 1 commit into
mainfrom
issue-2216

Conversation

@IAlibay

@IAlibay IAlibay commented Sep 25, 2026 •

Copy link
Copy Markdown
Member

Fixes #2216

My understanding of the model_validator docs is that we should return self at the end. It looks like this is the cause of the issue (not tried it locally yet).

Relevant docs section:

After validators: run after the whole model has been validated. As such, they are defined as instance methods and can be seen as post-initialization hooks. Important note: the validated instance should be returned.After validators: run after the whole model has been validated. As such, they are defined as instance methods and can be seen as post-initialization hooks. Important note: the validated instance should be returned.

LLM / AI generated code disclosure

LLMs or other AI-powered tools (beyond simple IDE use cases) were used in this contribution: no
If yes, please provide details here:

Checklist

  • All new code is appropriately documented (user-facing code must have complete docstrings).
  • Added a news entry, or the changes are not user-facing.
  • Ran pre-commit: you can run pre-commit locally or comment on this PR with pre-commit.ci autofix.
  • Adhered to the contribution guidelines
  • Filled in the AI generated code disclosure.

Manual Tests: these are slow so don't need to be run every commit, only before merging and when relevant changes are made (generally at reviewer-discretion).

Developers certificate of origin

@codecov

codecov Bot commented Sep 25, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 90.33%. Comparing base (1820817) to head (6480473).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2217      +/-   ##
==========================================
- Coverage   95.07%   90.33%   -4.74%     
==========================================
  Files         206      206              
  Lines       20697    20698       +1     
==========================================
- Hits        19677    18697     -980     
- Misses       1020     2001     +981     
Flag Coverage Δ
fast-tests 90.33% <100.00%> (?)
slow-tests ?

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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.

Potential settings issue with main

1 participant