Skip to content

Commit

Permalink
refactor: make exceptions private
Browse files Browse the repository at this point in the history
Signed-off-by: Henry Schreiner <[email protected]>
  • Loading branch information
henryiii committed Apr 2, 2024
1 parent 6e9c6c1 commit be9d0f7
Show file tree
Hide file tree
Showing 9 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ log_cli_level = "INFO"
testpaths = ["tests"]
xfail_strict = true
filterwarnings = [
"error::iminuit.exceptions.VisibleDeprecationWarning",
"error::iminuit._exceptions.VisibleDeprecationWarning",
"error::PendingDeprecationWarning",
"error::DeprecationWarning",
"error::FutureWarning",
Expand Down
2 changes: 1 addition & 1 deletion src/iminuit/_deprecated.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import warnings
from .exceptions import VisibleDeprecationWarning
from ._exceptions import VisibleDeprecationWarning


class deprecated:
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion src/iminuit/cost.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ class documentation for details.
is_positive_definite,
)
from .typing import Model, ModelGradient, LossFunction
from .exceptions import VisibleDeprecationWarning
from ._exceptions import VisibleDeprecationWarning
import numpy as np
from numpy.typing import NDArray, ArrayLike
from collections.abc import Sequence as ABCSequence
Expand Down
2 changes: 1 addition & 1 deletion tests/test_cost.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
)
from iminuit.util import describe
from iminuit.typing import Annotated, Gt, Lt
from iminuit.exceptions import VisibleDeprecationWarning
from iminuit._exceptions import VisibleDeprecationWarning
from typing import Sequence
import pickle

Expand Down
2 changes: 1 addition & 1 deletion tests/test_deprecated.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from iminuit._deprecated import deprecated, deprecated_parameter
from iminuit.exceptions import VisibleDeprecationWarning
from iminuit._exceptions import VisibleDeprecationWarning
import pytest


Expand Down
2 changes: 1 addition & 1 deletion tests/test_describe.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from iminuit.util import describe, make_func_code
from iminuit.typing import Annotated, Gt, Lt, Ge, Le, Interval
from iminuit.exceptions import VisibleDeprecationWarning
from iminuit._exceptions import VisibleDeprecationWarning
from math import ldexp
import platform
from functools import wraps
Expand Down
2 changes: 1 addition & 1 deletion tests/test_minuit.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
from iminuit.util import Param, make_func_code
from iminuit.warnings import IMinuitWarning, ErrordefAlreadySetWarning
from iminuit.typing import Annotated
from iminuit.exceptions import VisibleDeprecationWarning
from iminuit._exceptions import VisibleDeprecationWarning
from pytest import approx
from argparse import Namespace

Expand Down
2 changes: 1 addition & 1 deletion tests/test_util.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
from iminuit._optional_dependencies import optional_module_for
import pickle
from iminuit._hide_modules import hide_modules
from iminuit.exceptions import VisibleDeprecationWarning
from iminuit._exceptions import VisibleDeprecationWarning

try:
import scipy # noqa
Expand Down

0 comments on commit be9d0f7

Please sign in to comment.