From 8c6a14cef5b0c6175e490d2020a04cc4c5fb616d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Krist=C3=B3f=20T=C3=B3th?= Date: Tue, 24 Jul 2018 11:40:33 +0200 Subject: [PATCH] Move fsm stuff to a separate directory in lib --- lib/tfw/__init__.py | 4 +--- lib/tfw/fsm/__init__.py | 6 ++++++ lib/tfw/{ => fsm}/fsm_base.py | 0 lib/tfw/{ => fsm}/linear_fsm.py | 0 lib/tfw/{ => fsm}/yaml_fsm.py | 2 +- 5 files changed, 8 insertions(+), 4 deletions(-) create mode 100644 lib/tfw/fsm/__init__.py rename lib/tfw/{ => fsm}/fsm_base.py (100%) rename lib/tfw/{ => fsm}/linear_fsm.py (100%) rename lib/tfw/{ => fsm}/yaml_fsm.py (99%) diff --git a/lib/tfw/__init__.py b/lib/tfw/__init__.py index 04d934d..9c67327 100644 --- a/lib/tfw/__init__.py +++ b/lib/tfw/__init__.py @@ -2,6 +2,4 @@ # All Rights Reserved. See LICENSE file for details. from .event_handler_base import EventHandlerBase, FSMAwareEventHandler, BroadcastingEventHandler -from .fsm_base import FSMBase -from .linear_fsm import LinearFSM -from .yaml_fsm import YamlFSM +from .fsm import FSMBase, LinearFSM, YamlFSM diff --git a/lib/tfw/fsm/__init__.py b/lib/tfw/fsm/__init__.py new file mode 100644 index 0000000..11a7a58 --- /dev/null +++ b/lib/tfw/fsm/__init__.py @@ -0,0 +1,6 @@ +# Copyright (C) 2018 Avatao.com Innovative Learning Kft. +# All Rights Reserved. See LICENSE file for details. + +from .fsm_base import FSMBase +from .linear_fsm import LinearFSM +from .yaml_fsm import YamlFSM diff --git a/lib/tfw/fsm_base.py b/lib/tfw/fsm/fsm_base.py similarity index 100% rename from lib/tfw/fsm_base.py rename to lib/tfw/fsm/fsm_base.py diff --git a/lib/tfw/linear_fsm.py b/lib/tfw/fsm/linear_fsm.py similarity index 100% rename from lib/tfw/linear_fsm.py rename to lib/tfw/fsm/linear_fsm.py diff --git a/lib/tfw/yaml_fsm.py b/lib/tfw/fsm/yaml_fsm.py similarity index 99% rename from lib/tfw/yaml_fsm.py rename to lib/tfw/fsm/yaml_fsm.py index f454c22..38f7a8e 100644 --- a/lib/tfw/yaml_fsm.py +++ b/lib/tfw/fsm/yaml_fsm.py @@ -9,7 +9,7 @@ import yaml import jinja2 from transitions import State -from tfw import FSMBase +from .fsm_base import FSMBase class YamlFSM(FSMBase):