Skip to content

Fix broken test after #877 merge#918

Merged
henrydingliu merged 2 commits into
mainfrom
#856-init-cleanup
Jun 4, 2026
Merged

Fix broken test after #877 merge#918
henrydingliu merged 2 commits into
mainfrom
#856-init-cleanup

Conversation

@genedan
Copy link
Copy Markdown
Collaborator

@genedan genedan commented Jun 4, 2026

Summary of Changes

I'd merged #877 without merging in the changes from main, leading to a broken test in test_estimators_match_expected. This PR is a quick fix for that, it removes the type checking objects once they are no longer needed so that they don't leak into the public API.

Related GitHub Issue(s)

Additional Context for Reviewers

  • I passed tests locally for both code (uv run pytest) and documentation changes (uv run jb build docs --builder=custom --custom-builder=doctest)

Note

Low Risk
Narrow import/cleanup changes in package init with no runtime behavior change beyond restoring expected public exports.

Overview
Cleans up chainladder/__init__.py so typing-only imports and helpers no longer appear on the package namespace after the #877 typing work.

Any and Literal are imported only under TYPE_CHECKING, then TYPE_CHECKING, annotations, and overload are removed from the module after use. The deprecation warning string is renamed to _option_warning so it is not treated as public API.

Reviewed by Cursor Bugbot for commit abd3dda. Bugbot is set up for automated code reviews on this repo. Configure here.

@codecov
Copy link
Copy Markdown

codecov Bot commented Jun 4, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 88.28%. Comparing base (8863973) to head (abd3dda).

Additional details and impacted files
@@             Coverage Diff             @@
##             main     #918       +/-   ##
===========================================
+ Coverage   37.87%   88.28%   +50.41%     
===========================================
  Files          88       88               
  Lines        5025     5028        +3     
  Branches        0      642      +642     
===========================================
+ Hits         1903     4439     +2536     
+ Misses       3122      444     -2678     
- Partials        0      145      +145     
Flag Coverage Δ
unittests 88.28% <100.00%> (+50.41%) ⬆️

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.

@henrydingliu henrydingliu merged commit 8a4f172 into main Jun 4, 2026
17 checks passed
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.

2 participants