diff --git a/src/Graph/edge.py b/src/Graph/edge.py index f3f55ba..f38f452 100644 --- a/src/Graph/edge.py +++ b/src/Graph/edge.py @@ -1,9 +1,8 @@ """A Edge class to config the Edge in Graph""" +from tkinter import * from typing import TYPE_CHECKING from ttkbootstrap import * -from tkinter import * - if TYPE_CHECKING: from frame_graph import FrameGraph diff --git a/src/Graph/frame_graph.py b/src/Graph/frame_graph.py index da50725..7e11f04 100644 --- a/src/Graph/frame_graph.py +++ b/src/Graph/frame_graph.py @@ -1,8 +1,8 @@ """Frame contains Graph to visualize the algorithm""" -from ttkbootstrap import * +from tkinter import * from typing import TYPE_CHECKING -from tkinter import * +from ttkbootstrap import * from .edge import Edge from .node import Node diff --git a/src/Graph/node.py b/src/Graph/node.py index 94b5d87..e130392 100644 --- a/src/Graph/node.py +++ b/src/Graph/node.py @@ -1,9 +1,8 @@ """A Node class to config the node in Graph""" +from tkinter import * from typing import TYPE_CHECKING from ttkbootstrap import * -from tkinter import * - if TYPE_CHECKING: from .frame_graph import FrameGraph diff --git a/src/Graph/window.py b/src/Graph/window.py index 939b70e..e89b334 100644 --- a/src/Graph/window.py +++ b/src/Graph/window.py @@ -1,12 +1,11 @@ """The Window shows Application""" -from ttkbootstrap import * from tkinter import * +from ttkbootstrap import * +from ..utils import HEIGHT_WINDOW, WIDTH_WINDOW from .frame_graph import FrameGraph -from ..utils import WIDTH_WINDOW, HEIGHT_WINDOW - class CWindow(Window): """The window class inherits from tb.Window""" diff --git a/src/Q_Learning/__init__.py b/src/Q_Learning/__init__.py index b33ca70..5e8de4b 100644 --- a/src/Q_Learning/__init__.py +++ b/src/Q_Learning/__init__.py @@ -1,4 +1,4 @@ """Modules""" -from .q_learning_networkx import GraphNetworkX,GraphNetworkXForQLearning +from .q_learning_networkx import GraphNetworkX, GraphNetworkXForQLearning -__all__ :list[str] = ["GraphNetworkX","GraphNetworkXForQLearning"] \ No newline at end of file +__all__: list[str] = ["GraphNetworkX", "GraphNetworkXForQLearning"] diff --git a/src/__init__.py b/src/__init__.py index 11e50d9..b68dc94 100644 --- a/src/__init__.py +++ b/src/__init__.py @@ -1,7 +1,8 @@ """Modules""" from .Graph import CWindow, Edge, FrameGraph, Node -from .Q_Learning import GraphNetworkX,GraphNetworkXForQLearning -from .utils import coordinate_list_random, coordinate_random,WIDTH_WINDOW,HEIGHT_WINDOW,DEFAULT_EDGES_NETWORKX +from .Q_Learning import GraphNetworkX, GraphNetworkXForQLearning +from .utils import (DEFAULT_EDGES_NETWORKX, HEIGHT_WINDOW, WIDTH_WINDOW, + coordinate_list_random, coordinate_random) __all__: list[str] = ["Edge", "FrameGraph", "Node", - "CWindow", "coordinate_random", "coordinate_list_random","GraphNetworkX","GraphNetworkXForQLearning","WIDTH_WINDOW","HEIGHT_WINDOW","DEFAULT_EDGES_NETWORKX"] + "CWindow", "coordinate_random", "coordinate_list_random", "GraphNetworkX", "GraphNetworkXForQLearning", "WIDTH_WINDOW", "HEIGHT_WINDOW", "DEFAULT_EDGES_NETWORKX"] diff --git a/src/utils/__init__.py b/src/utils/__init__.py index c627319..0279fd8 100644 --- a/src/utils/__init__.py +++ b/src/utils/__init__.py @@ -1,6 +1,6 @@ """Modules""" +from .constants import DEFAULT_EDGES_NETWORKX, HEIGHT_WINDOW, WIDTH_WINDOW from .coordinate import coordinate_list_random, coordinate_random -from .constants import WIDTH_WINDOW,HEIGHT_WINDOW,DEFAULT_EDGES_NETWORKX - -__all__: list[str] = ["coordinate_random", "coordinate_list_random","WIDTH_WINDOW","HEIGHT_WINDOW","DEFAULT_EDGES_NETWORKX"] +__all__: list[str] = ["coordinate_random", "coordinate_list_random", + "WIDTH_WINDOW", "HEIGHT_WINDOW", "DEFAULT_EDGES_NETWORKX"]