diff --git a/gui/wxpython/mapdisp/frame.py b/gui/wxpython/mapdisp/frame.py index c6f17c438bf..119a14a8159 100644 --- a/gui/wxpython/mapdisp/frame.py +++ b/gui/wxpython/mapdisp/frame.py @@ -24,9 +24,8 @@ from __future__ import annotations - -import os import copy +import os from typing import TYPE_CHECKING from core import globalvar @@ -44,16 +43,16 @@ from gui_core.query import QueryDialog, PrepareQueryResults from mapwin.buffered import BufferedMapWindow from mapwin.decorations import ( - LegendController, - BarscaleController, ArrowController, + BarscaleController, DtextController, + LegendController, LegendVectController, ) from mapwin.analysis import ( - ProfileController, - MeasureDistanceController, MeasureAreaController, + MeasureDistanceController, + ProfileController, ) from gui_core.forms import GUI from core.giface import Notification @@ -63,12 +62,11 @@ from main_window.page import MainPageBase import grass.script as gs - from grass.pydispatch.signal import Signal if TYPE_CHECKING: - import main_window.frame import lmgr.frame + import main_window.frame class MapPanel(SingleMapPanel, MainPageBase): @@ -304,7 +302,7 @@ def GetMapWindow(self): def _addToolbarVDigit(self): """Add vector digitizer toolbar""" - from vdigit.main import haveVDigit, VDigit + from vdigit.main import VDigit, haveVDigit from vdigit.toolbars import VDigitToolbar if not haveVDigit: @@ -409,7 +407,7 @@ def _updateVDigitLayers(self, layer): def AddNviz(self): """Add 3D view mode window""" - from nviz.main import haveNviz, GLWindow, errorMsg + from nviz.main import GLWindow, errorMsg, haveNviz # check for GLCanvas and OpenGL if not haveNviz: @@ -1611,7 +1609,7 @@ def _switchMapWindow(self, map_win): def AddRDigit(self): """Adds raster digitizer: creates toolbar and digitizer controller, binds events and signals.""" - from rdigit.controller import RDigitController, EVT_UPDATE_PROGRESS + from rdigit.controller import EVT_UPDATE_PROGRESS, RDigitController from rdigit.toolbars import RDigitToolbar self.rdigit = RDigitController(self._giface, mapWindow=self.GetMapWindow()) diff --git a/gui/wxpython/nviz/mapwindow.py b/gui/wxpython/nviz/mapwindow.py index e7b31848292..6648e3c50df 100644 --- a/gui/wxpython/nviz/mapwindow.py +++ b/gui/wxpython/nviz/mapwindow.py @@ -20,19 +20,18 @@ from __future__ import annotations +import copy +import math import os import sys import time -import copy -import math - from threading import Thread from typing import TYPE_CHECKING import wx from wx.lib.newevent import NewEvent from wx import glcanvas -from wx.glcanvas import WX_GL_RGBA, WX_GL_DOUBLEBUFFER, WX_GL_DEPTH_SIZE +from wx.glcanvas import WX_GL_DEPTH_SIZE, WX_GL_DOUBLEBUFFER, WX_GL_RGBA import grass.script as gs from grass.pydispatch.signal import Signal @@ -49,8 +48,8 @@ from core.giface import Notification if TYPE_CHECKING: - import main_window.frame import lmgr.frame + import main_window.frame wxUpdateProperties, EVT_UPDATE_PROP = NewEvent() wxUpdateView, EVT_UPDATE_VIEW = NewEvent()