diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 20d94e7f..b6806c8c 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,6 +1,6 @@ repos: - repo: https://github.com/pycqa/isort - rev: 5.11.2 + rev: 5.11.3 hooks: - id: isort args: ["--settings-path", "pyproject.toml", "--check"] @@ -10,6 +10,11 @@ repos: hooks: - id: black args: ["--config", "pyproject.toml", "--check"] + - repo: https://github.com/hadialqattan/pycln + rev: v2.1.2 # Possible releases: https://github.com/hadialqattan/pycln/releases + hooks: + - id: pycln + args: ["--config", "pyproject.toml"] - repo: https://github.com/pre-commit/pre-commit-hooks rev: v2.3.0 hooks: diff --git a/pyproject.toml b/pyproject.toml index f2a639e8..ad84c5f3 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -37,6 +37,7 @@ exclude = '''   | build   | dist | .*venv* + | __init__.py )/ ''' @@ -56,6 +57,6 @@ extend_skip = '''   | _build   | build   | dist - | .*venv* )/ ''' +skip_glob = ["**/__init__.py", "*venv"] \ No newline at end of file diff --git a/src/funman/model/__init__.py b/src/funman/model/__init__.py index f888fb8f..4f749bbe 100644 --- a/src/funman/model/__init__.py +++ b/src/funman/model/__init__.py @@ -2,9 +2,8 @@ This submodule contains class definitions used to represent and interact with models in FUNMAN. """ - +from .model import * +from .query import * from .bilayer import * from .encoded import * from .gromet import * -from .model import * -from .query import * diff --git a/src/funman/scenario/__init__.py b/src/funman/scenario/__init__.py index 7134da2d..daab8204 100644 --- a/src/funman/scenario/__init__.py +++ b/src/funman/scenario/__init__.py @@ -3,6 +3,6 @@ is capable of solving. """ +from .scenario import * from .consistency import * from .parameter_synthesis import * -from .scenario import * diff --git a/src/funman/search/__init__.py b/src/funman/search/__init__.py index 9426aaf6..cd793a2c 100644 --- a/src/funman/search/__init__.py +++ b/src/funman/search/__init__.py @@ -2,8 +2,8 @@ This subpackage contains the search algorithms used to run FUNMAN. It also defines the representations for episodes (single executions) of one of the search algorithms supported by FUNMAN. """ -from .box_search import * from .handlers import * from .representation import * from .search import * +from .box_search import * from .smt_check import * diff --git a/src/funman/translate/__init__.py b/src/funman/translate/__init__.py index 264fa7fd..ba79ebd4 100644 --- a/src/funman/translate/__init__.py +++ b/src/funman/translate/__init__.py @@ -1,4 +1,4 @@ +from .translate import * from .bilayer import * from .encoded import * from .gromet import * -from .translate import * diff --git a/src/funman/translate/gromet.py b/src/funman/translate/gromet.py index a781b743..6735602b 100644 --- a/src/funman/translate/gromet.py +++ b/src/funman/translate/gromet.py @@ -28,7 +28,7 @@ ) from pysmt.typing import BOOL, INT, REAL -from funman.model import GrometModel, Model +from funman.model import Model from funman.translate import Encoder, EncodingOptions # TODO more descriptive name