Skip to content

Commit

Permalink
wxGUI: Specified imports in iclass/frame.py to fix F403 (OSGeo#4772)
Browse files Browse the repository at this point in the history
  • Loading branch information
arohanajit authored Dec 20, 2024
1 parent 9fd2ceb commit 19f6989
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 26 deletions.
1 change: 0 additions & 1 deletion .flake8
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ per-file-ignores =
gui/wxpython/vdigit/*: F841, E722, F405, F403
gui/wxpython/animation/g.gui.animation.py: E501
gui/wxpython/tplot/g.gui.tplot.py: E501
gui/wxpython/iclass/frame.py: F405, F403
gui/wxpython/iclass/g.gui.iclass.py: E501
gui/wxpython/iclass/statistics.py: F841, F405, F403
gui/wxpython/location_wizard/wizard.py: E722
Expand Down
69 changes: 44 additions & 25 deletions gui/wxpython/iclass/frame.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,17 +18,38 @@
@author Anna Kratochvilova <kratochanna gmail.com>
"""

import os
import copy
import os
import tempfile
from ctypes import byref, pointer

import wx

from ctypes import *

try:
from grass.lib.imagery import *
from grass.lib.vector import *
from grass.lib.imagery import (
I_free_group_ref,
I_free_signatures,
I_iclass_add_signature,
I_iclass_analysis,
I_iclass_create_raster,
I_iclass_free_statistics,
I_iclass_init_group,
I_iclass_init_signatures,
I_iclass_init_statistics,
I_iclass_statistics_set_nstd,
I_iclass_write_signatures,
I_init_group_ref,
I_init_signatures,
IClass_statistics,
Ref,
Signature,
)
from grass.lib.vector import (
Vect_area_alive,
Vect_get_map_box,
Vect_get_num_areas,
bound_box,
)

haveIClass = True
errMsg = ""
Expand All @@ -37,37 +58,35 @@
errMsg = _("Loading imagery lib failed.\n%s") % e

import grass.script as gs

from mapdisp import statusbar as sb
from mapdisp.main import StandaloneMapDisplayGrassInterface
from mapwin.buffered import BufferedMapWindow
from vdigit.toolbars import VDigitToolbar
from gui_core.mapdisp import DoubleMapPanel, FrameMixin
from core import globalvar
from core.gcmd import GError, GMessage, RunCommand
from core.render import Map
from core.gcmd import RunCommand, GMessage, GError
from dbmgr.vinfo import VectorDBInfo
from grass.pydispatch.signal import Signal
from gui_core.dialogs import SetOpacityDialog
from gui_core.mapdisp import DoubleMapPanel, FrameMixin
from gui_core.wrap import Menu
from dbmgr.vinfo import VectorDBInfo
from mapdisp import statusbar as sb
from mapdisp.main import StandaloneMapDisplayGrassInterface
from mapwin.buffered import BufferedMapWindow
from vdigit.toolbars import VDigitToolbar

from iclass.digit import IClassVDigitWindow, IClassVDigit
from iclass.toolbars import (
IClassMapToolbar,
IClassMiscToolbar,
IClassToolbar,
IClassMapManagerToolbar,
)
from iclass.statistics import StatisticsData
from iclass.dialogs import (
IClassCategoryManagerDialog,
IClassGroupDialog,
IClassSignatureFileDialog,
IClassExportAreasDialog,
IClassGroupDialog,
IClassMapDialog,
IClassSignatureFileDialog,
)
from iclass.digit import IClassVDigit, IClassVDigitWindow
from iclass.plots import PlotPanel

from grass.pydispatch.signal import Signal
from iclass.statistics import StatisticsData
from iclass.toolbars import (
IClassMapManagerToolbar,
IClassMapToolbar,
IClassMiscToolbar,
IClassToolbar,
)


class IClassMapPanel(DoubleMapPanel):
Expand Down

0 comments on commit 19f6989

Please sign in to comment.