diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index a6ee057..9164fd7 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -6,7 +6,7 @@ ci: repos: - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v4.5.0 + rev: v4.6.0 hooks: - id: check-yaml - id: fix-encoding-pragma @@ -18,7 +18,7 @@ repos: args: ['--maxkb=500'] - repo: https://github.com/psf/black - rev: 23.12.1 + rev: 24.4.2 hooks: - id: black @@ -38,13 +38,13 @@ repos: - --profile=black - repo: https://github.com/asottile/pyupgrade - rev: v3.15.0 + rev: v3.16.0 hooks: - id: pyupgrade args: [--py38-plus] - repo: https://github.com/PyCQA/autoflake - rev: v2.2.1 + rev: v2.3.1 hooks: - id: autoflake args: @@ -71,6 +71,6 @@ repos: - id: rst-inline-touching-normal - repo: https://github.com/pre-commit/mirrors-mypy - rev: 'v1.8.0' # Use the sha / tag you want to point at + rev: 'v1.10.1' # Use the sha / tag you want to point at hooks: - id: mypy diff --git a/src/sparselm/model/__init__.py b/src/sparselm/model/__init__.py index 922911a..6ea15d8 100644 --- a/src/sparselm/model/__init__.py +++ b/src/sparselm/model/__init__.py @@ -1,4 +1,5 @@ """Classes implementing generalized linear regression Regressors.""" + from ._adaptive_lasso import ( AdaptiveGroupLasso, AdaptiveLasso, diff --git a/src/sparselm/model/_adaptive_lasso.py b/src/sparselm/model/_adaptive_lasso.py index 81c03d2..2c6dada 100644 --- a/src/sparselm/model/_adaptive_lasso.py +++ b/src/sparselm/model/_adaptive_lasso.py @@ -113,8 +113,9 @@ def __init__( max_iter: int = 3, eps: float = 1e-6, tol: float = 1e-10, - update_function: Callable[[NDArray[np.floating], float], ArrayLike] - | None = None, + update_function: ( + Callable[[NDArray[np.floating], float], ArrayLike] | None + ) = None, fit_intercept: bool = False, copy_X: bool = True, warm_start: bool = True, @@ -310,8 +311,9 @@ def __init__( max_iter: int = 3, eps: float = 1e-6, tol: float = 1e-10, - update_function: Callable[[NDArray[np.floating], float], ArrayLike] - | None = None, + update_function: ( + Callable[[NDArray[np.floating], float], ArrayLike] | None + ) = None, standardize: bool = False, fit_intercept: bool = False, copy_X: bool = True, @@ -457,8 +459,9 @@ def __init__( max_iter: int = 3, eps: float = 1e-6, tol: float = 1e-10, - update_function: Callable[[NDArray[np.floating], float], ArrayLike] - | None = None, + update_function: ( + Callable[[NDArray[np.floating], float], ArrayLike] | None + ) = None, standardize: bool = False, fit_intercept: bool = False, copy_X: bool = True, @@ -606,8 +609,9 @@ def __init__( max_iter: int = 3, eps: float = 1e-6, tol: float = 1e-10, - update_function: Callable[[NDArray[np.floating], float], ArrayLike] - | None = None, + update_function: ( + Callable[[NDArray[np.floating], float], ArrayLike] | None + ) = None, standardize: bool = False, fit_intercept: bool = False, copy_X: bool = True, @@ -808,8 +812,9 @@ def __init__( max_iter: int = 3, eps: float = 1e-6, tol: float = 1e-10, - update_function: Callable[[NDArray[np.floating], float], ArrayLike] - | None = None, + update_function: ( + Callable[[NDArray[np.floating], float], ArrayLike] | None + ) = None, standardize: bool = False, fit_intercept: bool = False, copy_X: bool = True, diff --git a/src/sparselm/model/_miqp/__init__.py b/src/sparselm/model/_miqp/__init__.py index 3bc2b8e..c530db9 100644 --- a/src/sparselm/model/_miqp/__init__.py +++ b/src/sparselm/model/_miqp/__init__.py @@ -1,6 +1,5 @@ """MIQP based regression Regressors.""" - from ._best_subset import BestSubsetSelection, RidgedBestSubsetSelection from ._regularized_l0 import L1L0, L2L0, RegularizedL0 diff --git a/tests/test_stepwise.py b/tests/test_stepwise.py index f20a39d..2b1c7c0 100644 --- a/tests/test_stepwise.py +++ b/tests/test_stepwise.py @@ -1,4 +1,5 @@ """Test composite estimator class.""" + import numpy as np import numpy.testing as npt import pytest