Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Dec 2, 2024
1 parent 90ab2f3 commit fe4a890
Show file tree
Hide file tree
Showing 13 changed files with 30 additions and 30 deletions.
2 changes: 1 addition & 1 deletion src/pyhf/cli/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
from pyhf.cli.complete import cli as complete
from pyhf.contrib import cli as contrib

__all__ = ['cli', 'rootio', 'spec', 'infer', 'complete', 'contrib']
__all__ = ['cli', 'complete', 'contrib', 'infer', 'rootio', 'spec']


def __dir__():
Expand Down
2 changes: 1 addition & 1 deletion src/pyhf/infer/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ def hypotest(

from pyhf.infer import intervals

__all__ = ["hypotest", "calculators", "intervals", "mle", "test_statistics", "utils"]
__all__ = ["calculators", "hypotest", "intervals", "mle", "test_statistics", "utils"]


def __dir__():
Expand Down
2 changes: 1 addition & 1 deletion src/pyhf/infer/intervals/upper_limits.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
from pyhf import get_backend
from pyhf.infer import hypotest

__all__ = ["upper_limit", "linear_grid_scan", "toms748_scan"]
__all__ = ["linear_grid_scan", "toms748_scan", "upper_limit"]


def __dir__():
Expand Down
2 changes: 1 addition & 1 deletion src/pyhf/optimize/opt_minuit.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ class minuit_optimizer(OptimizerMixin):
Optimizer that minimizes via :meth:`iminuit.Minuit.migrad`.
"""

__slots__ = ['name', 'errordef', 'steps', 'strategy', 'tolerance']
__slots__ = ['errordef', 'name', 'steps', 'strategy', 'tolerance']

def __init__(self, *args, **kwargs):
"""
Expand Down
2 changes: 1 addition & 1 deletion src/pyhf/optimize/opt_scipy.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ class scipy_optimizer(OptimizerMixin):
Optimizer that uses :func:`scipy.optimize.minimize`.
"""

__slots__ = ['name', 'tolerance', 'solver_options']
__slots__ = ['name', 'solver_options', 'tolerance']

def __init__(self, *args, **kwargs):
"""
Expand Down
6 changes: 3 additions & 3 deletions src/pyhf/parameters/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@
from pyhf.parameters.paramview import ParamViewer

__all__ = [
'paramset',
'unconstrained',
'ParamViewer',
'constrained_by_normal',
'constrained_by_poisson',
'paramset',
'reduce_paramsets_requirements',
'ParamViewer',
'unconstrained',
]


Expand Down
2 changes: 1 addition & 1 deletion src/pyhf/schema/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@

__all__ = [
"load_schema",
"validate",
"path",
"validate",
"version",
]

Expand Down
4 changes: 2 additions & 2 deletions src/pyhf/tensor/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@

class _BackendRetriever:
__slots__ = [
"_array_types",
"_array_subtypes",
"numpy_backend",
"_array_types",
"jax_backend",
"numpy_backend",
"pytorch_backend",
"tensorflow_backend",
]
Expand Down
2 changes: 1 addition & 1 deletion src/pyhf/tensor/jax_backend.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ def log_prob(self, value):
class jax_backend:
"""JAX backend for pyhf"""

__slots__ = ['name', 'precision', 'dtypemap', 'default_do_grad']
__slots__ = ['default_do_grad', 'dtypemap', 'name', 'precision']

#: The array type for jax
array_type = Array
Expand Down
2 changes: 1 addition & 1 deletion src/pyhf/tensor/numpy_backend.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ def log_prob(self, value: NDArray[np.number[T]]) -> ArrayLike:
class numpy_backend(Generic[T]):
"""NumPy backend for pyhf"""

__slots__ = ['name', 'precision', 'dtypemap', 'default_do_grad']
__slots__ = ['default_do_grad', 'dtypemap', 'name', 'precision']

#: The array type for numpy
array_type = np.ndarray
Expand Down
2 changes: 1 addition & 1 deletion src/pyhf/tensor/pytorch_backend.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
class pytorch_backend:
"""PyTorch backend for pyhf"""

__slots__ = ['name', 'precision', 'dtypemap', 'default_do_grad']
__slots__ = ['default_do_grad', 'dtypemap', 'name', 'precision']

#: The array type for pytorch
array_type = torch.Tensor
Expand Down
2 changes: 1 addition & 1 deletion src/pyhf/tensor/tensorflow_backend.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
class tensorflow_backend:
"""TensorFlow backend for pyhf"""

__slots__ = ['name', 'precision', 'dtypemap', 'default_do_grad']
__slots__ = ['default_do_grad', 'dtypemap', 'name', 'precision']

#: The array type for tensorflow
array_type = tf.Tensor
Expand Down
30 changes: 15 additions & 15 deletions src/pyhf/typing.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,26 +12,26 @@
)

__all__ = (
"PathOrStr",
"ParameterBase",
"Parameter",
"Measurement",
"ModifierBase",
"NormSys",
"NormFactor",
"Channel",
"HistoSys",
"StatError",
"ShapeSys",
"ShapeFactor",
"Literal",
"LumiSys",
"Measurement",
"Modifier",
"Sample",
"Channel",
"ModifierBase",
"NormFactor",
"NormSys",
"Observation",
"Workspace",
"Literal",
"TypedDict",
"Parameter",
"ParameterBase",
"PathOrStr",
"Protocol",
"Sample",
"ShapeFactor",
"ShapeSys",
"StatError",
"TypedDict",
"Workspace",
)


Expand Down

0 comments on commit fe4a890

Please sign in to comment.