diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 9b256cd8..13fbd790 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -13,7 +13,7 @@ repos: - id: black-jupyter args: [--config=pyproject.toml] - repo: https://github.com/charliermarsh/ruff-pre-commit - rev: v0.7.4 + rev: v0.8.0 hooks: # Linting for Python - id: ruff diff --git a/cneuromax/fitting/deeplearning/datamodule/__init__.py b/cneuromax/fitting/deeplearning/datamodule/__init__.py index d079837d..18e76889 100644 --- a/cneuromax/fitting/deeplearning/datamodule/__init__.py +++ b/cneuromax/fitting/deeplearning/datamodule/__init__.py @@ -6,4 +6,4 @@ Datasets, ) -__all__ = ["Datasets", "BaseDataModuleConfig", "BaseDataModule"] +__all__ = ["BaseDataModule", "BaseDataModuleConfig", "Datasets"] diff --git a/cneuromax/fitting/deeplearning/litmodule/__init__.py b/cneuromax/fitting/deeplearning/litmodule/__init__.py index a8418a38..9fcbc5d7 100644 --- a/cneuromax/fitting/deeplearning/litmodule/__init__.py +++ b/cneuromax/fitting/deeplearning/litmodule/__init__.py @@ -5,4 +5,4 @@ BaseLitModuleConfig, ) -__all__ = ["BaseLitModuleConfig", "BaseLitModule"] +__all__ = ["BaseLitModule", "BaseLitModuleConfig"] diff --git a/cneuromax/fitting/deeplearning/litmodule/classification/__init__.py b/cneuromax/fitting/deeplearning/litmodule/classification/__init__.py index db70a46c..512c81de 100644 --- a/cneuromax/fitting/deeplearning/litmodule/classification/__init__.py +++ b/cneuromax/fitting/deeplearning/litmodule/classification/__init__.py @@ -5,4 +5,4 @@ BaseClassificationLitModuleConfig, ) -__all__ = ["BaseClassificationLitModuleConfig", "BaseClassificationLitModule"] +__all__ = ["BaseClassificationLitModule", "BaseClassificationLitModuleConfig"] diff --git a/cneuromax/fitting/deeplearning/litmodule/classification/base.py b/cneuromax/fitting/deeplearning/litmodule/classification/base.py index 305c467e..ea2699e2 100644 --- a/cneuromax/fitting/deeplearning/litmodule/classification/base.py +++ b/cneuromax/fitting/deeplearning/litmodule/classification/base.py @@ -1,7 +1,7 @@ """:class:`.BaseClassificationLitModule` & its config.""" from abc import ABC -from collections.abc import Callable # noqa: TCH003 +from collections.abc import Callable # noqa: TC003 from dataclasses import dataclass from typing import Annotated as An from typing import Any diff --git a/cneuromax/fitting/deeplearning/litmodule/nnmodule/__init__.py b/cneuromax/fitting/deeplearning/litmodule/nnmodule/__init__.py index 10289f39..9439d6b3 100644 --- a/cneuromax/fitting/deeplearning/litmodule/nnmodule/__init__.py +++ b/cneuromax/fitting/deeplearning/litmodule/nnmodule/__init__.py @@ -5,4 +5,4 @@ MLPConfig, ) -__all__ = ["MLPConfig", "MLP"] +__all__ = ["MLP", "MLPConfig"] diff --git a/cneuromax/fitting/neuroevolution/space/__init__.py b/cneuromax/fitting/neuroevolution/space/__init__.py index 8c7e7d85..8871fdd6 100644 --- a/cneuromax/fitting/neuroevolution/space/__init__.py +++ b/cneuromax/fitting/neuroevolution/space/__init__.py @@ -9,7 +9,7 @@ ) __all__ = [ + "BaseReinforcementSpace", "BaseSpace", "BaseSpaceConfig", - "BaseReinforcementSpace", ] diff --git a/cneuromax/projects/classify_mnist/__init__.py b/cneuromax/projects/classify_mnist/__init__.py index dcba4deb..38273b8f 100644 --- a/cneuromax/projects/classify_mnist/__init__.py +++ b/cneuromax/projects/classify_mnist/__init__.py @@ -12,10 +12,10 @@ from .litmodule import MNISTClassificationLitModule __all__ = [ - "TaskRunner", - "MNISTDataModuleConfig", - "MNISTDataModule", "MNISTClassificationLitModule", + "MNISTDataModule", + "MNISTDataModuleConfig", + "TaskRunner", ] diff --git a/cneuromax/projects/neuroevorl_control/__init__.py b/cneuromax/projects/neuroevorl_control/__init__.py index 4414361e..9a71e4d5 100644 --- a/cneuromax/projects/neuroevorl_control/__init__.py +++ b/cneuromax/projects/neuroevorl_control/__init__.py @@ -9,11 +9,11 @@ from .space import GymReinforcementSpace, GymReinforcementSpaceConfig __all__ = [ - "TaskRunner", "GymAgent", "GymAgentConfig", "GymReinforcementSpace", "GymReinforcementSpaceConfig", + "TaskRunner", ] diff --git a/pyproject.toml b/pyproject.toml index c7672715..097fde40 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -143,11 +143,11 @@ ignore = [ # https://docs.astral.sh/ruff/rules/suspicious-pickle-usage/ # Disabled due to current implementation of checkpointing # in `cneuromax.fitting.neuroevolution`. - "TCH001", # `typing-only-first-party-import` + "TC001", # `typing-only-first-party-import` # Move application import {} into a type-checking block # https://docs.astral.sh/ruff/rules/typing-only-first-party-import/ # Disabled as we use Beartype for dynamic type checking. - "TCH002", # `typing-only-third-party-import` + "TC002", # `typing-only-third-party-import` # Move third-party import {} into a type-checking block # https://docs.astral.sh/ruff/rules/typing-only-third-party-import/ # Disabled as we use Beartype for dynamic type checking.