Skip to content

Commit

Permalink
checks: Move imports to the top in wxGUI/core (#4357)
Browse files Browse the repository at this point in the history
Moves imports to the top to fix Flake8 E402 warning for wxGUI/core.

Also orders ignores alphabetically.
  • Loading branch information
arohanajit authored Sep 21, 2024
1 parent 5aed1a6 commit 0c1e79b
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 15 deletions.
6 changes: 2 additions & 4 deletions .flake8
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,12 @@ per-file-ignores =
doc/gui/wxpython/example/dialogs.py: F401
locale/grass_po_stats.py: E122, E128, E231, E401, E722
gui/scripts/d.wms.py: E501
gui/wxpython/core/gcmd.py: E402
gui/wxpython/core/gconsole.py: E722
gui/wxpython/core/render.py: E722
gui/wxpython/core/settings.py: E722
gui/wxpython/core/toolboxes.py: E722
gui/wxpython/core/utils.py: E722
gui/wxpython/core/workspace.py: E722
gui/wxpython/core/render.py: E722
gui/wxpython/core/settings.py: E722
gui/wxpython/core/watchdog.py: E402
gui/wxpython/datacatalog/tree.py: E731, E402
gui/wxpython/dbmgr/base.py: E722
gui/wxpython/dbmgr/dialogs.py: E722
Expand Down
12 changes: 6 additions & 6 deletions gui/wxpython/core/gcmd.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,12 @@
from threading import Thread
import wx

from core.debug import Debug
from core.globalvar import SCT_EXT

from grass.script import core as grass
from grass.script.utils import decode, encode

is_mswindows = sys.platform == "win32"
if is_mswindows:
from win32file import ReadFile, WriteFile
Expand All @@ -45,12 +51,6 @@
import select
import fcntl

from core.debug import Debug
from core.globalvar import SCT_EXT

from grass.script import core as grass
from grass.script.utils import decode, encode


def DecodeString(string):
"""Decode string using system encoding
Expand Down
9 changes: 4 additions & 5 deletions gui/wxpython/core/watchdog.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,10 @@

import os
import time
import wx
from wx.lib.newevent import NewEvent

from grass.script import core as grass

watchdog_used = True
try:
Expand All @@ -32,11 +36,6 @@
PatternMatchingEventHandler = object
FileSystemEventHandler = object

import wx
from wx.lib.newevent import NewEvent

from grass.script import core as grass

updateMapset, EVT_UPDATE_MAPSET = NewEvent()
currentMapsetChanged, EVT_CURRENT_MAPSET_CHANGED = NewEvent()

Expand Down

0 comments on commit 0c1e79b

Please sign in to comment.