[BUG] fix missing Cauchy import in distributions __init__ - #1122
Open
Ashish-Kumar-Dash wants to merge 1 commit into
Open
[BUG] fix missing Cauchy import in distributions __init__#1122Ashish-Kumar-Dash wants to merge 1 commit into
Cauchy import in distributions __init__#1122Ashish-Kumar-Dash wants to merge 1 commit into
Conversation
`Cauchy` was listed in `__all__` but its import line was missing from `skpro/distributions/__init__.py`, so `from skpro.distributions import Cauchy` raised ImportError although the class existed in `cauchy.py`. Add the import, and a regression test asserting every name in `__all__` is importable from the package (guards the whole class of __all__/import drift).
Ashish-Kumar-Dash
requested review from
felipeangelimvieira and
fkiraly
as code owners
August 8, 2026 13:30
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this implement/fix? Explain your changes.
Cauchyis listed inskpro/distributions/__init__.py__all__, and the class exists incauchy.py, but the corresponding import line was missing. As a resultfrom skpro.distributions import CauchyraisedImportError, the class was effectively unreachable through the public API.from skpro.distributions.cauchy import Cauchy.__all__is importable from the package, so this class of__all__/import drift is caught for any distribution, not justCauchy.Does your contribution introduce a new dependency? If yes, which one?
No.
Did you add any tests for the change?
Yes,
distributions/tests/test_registration.py::test_all_names_importable. It fails before the fix (missing: ['Cauchy']) and passes after.