From f0363e1d3241e68bb5527cf040c49aca95b16f2b Mon Sep 17 00:00:00 2001 From: Youri Westerman Date: Wed, 9 Oct 2024 12:34:49 +0200 Subject: [PATCH 1/4] Add "--check" argument to isort command --- .github/workflows/ci.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index a41e136..7e40da8 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -63,7 +63,7 @@ jobs: run: poetry install - name: isort - run: poetry run isort . + run: poetry run isort . --check MyPy: runs-on: ubuntu-latest From e6b51e98e9a680eecf540b93d08e1b163d34eac0 Mon Sep 17 00:00:00 2001 From: Youri Westerman Date: Wed, 9 Oct 2024 12:42:11 +0200 Subject: [PATCH 2/4] Run isort --- tests/test_statemachine.py | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/tests/test_statemachine.py b/tests/test_statemachine.py index f64ef84..b1cd62a 100644 --- a/tests/test_statemachine.py +++ b/tests/test_statemachine.py @@ -5,16 +5,10 @@ import pytest from pytest_mock import MockerFixture -from mp_fsm.statemachine import ( - BaseCallback, - BaseGuard, - BaseStateMachine, - BaseTransition, - GuardException, - StateAware, - TransitionNotFoundException, - WrongStateException, -) +from mp_fsm.statemachine import (BaseCallback, BaseGuard, BaseStateMachine, + BaseTransition, GuardException, StateAware, + TransitionNotFoundException, + WrongStateException) class MyStates(StrEnum): From 8e345a146bd547213002401c1cb72963174cfd45 Mon Sep 17 00:00:00 2001 From: Youri Westerman Date: Wed, 9 Oct 2024 12:43:23 +0200 Subject: [PATCH 3/4] Run black --- tests/test_statemachine.py | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/tests/test_statemachine.py b/tests/test_statemachine.py index b1cd62a..f64ef84 100644 --- a/tests/test_statemachine.py +++ b/tests/test_statemachine.py @@ -5,10 +5,16 @@ import pytest from pytest_mock import MockerFixture -from mp_fsm.statemachine import (BaseCallback, BaseGuard, BaseStateMachine, - BaseTransition, GuardException, StateAware, - TransitionNotFoundException, - WrongStateException) +from mp_fsm.statemachine import ( + BaseCallback, + BaseGuard, + BaseStateMachine, + BaseTransition, + GuardException, + StateAware, + TransitionNotFoundException, + WrongStateException, +) class MyStates(StrEnum): From d12c3f01c71f9f434ed17337e5e85d5786cadf39 Mon Sep 17 00:00:00 2001 From: Youri Westerman Date: Wed, 9 Oct 2024 12:45:07 +0200 Subject: [PATCH 4/4] Add some settings for isort and mypy --- pyproject.toml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/pyproject.toml b/pyproject.toml index c6df9d6..1d63599 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -24,4 +24,12 @@ build-backend = "poetry.core.masonry.api" [tool.coverage.run] omit = [ "tests/*" + ] + +[tool.isort] +profile = "black" +overwrite_in_place = true + +[tool.mypy] +strict = true