소스 검색

flake8: fix F401 (unused import) and F821 (undefined name) in scripts and lib (#1314)

Anna Petrasova 4 년 전
부모
커밋
847219c842
53개의 변경된 파일45개의 추가작업 그리고 103개의 파일을 삭제
  1. 10 4
      lib/python/.flake8
  2. 0 1
      lib/python/bandref/reader.py
  3. 1 2
      lib/python/gunittest/checkers.py
  4. 1 1
      lib/python/gunittest/invoker.py
  5. 0 1
      lib/python/gunittest/multirunner.py
  6. 6 14
      lib/python/imaging/images2swf.py
  7. 0 5
      lib/python/imaging/operations.py
  8. 1 2
      lib/python/pygrass/errors.py
  9. 1 1
      lib/python/pygrass/gis/region.py
  10. 2 1
      lib/python/pygrass/raster/__init__.py
  11. 2 1
      lib/python/pygrass/vector/abstract.py
  12. 1 1
      lib/python/pygrass/vector/find.py
  13. 1 1
      lib/python/pygrass/vector/table.py
  14. 1 1
      lib/python/pygrass/vector/vector_type.py
  15. 0 1
      lib/python/script/core.py
  16. 1 2
      lib/python/script/task.py
  17. 2 9
      lib/python/script/vector.py
  18. 1 1
      lib/python/temporal/base.py
  19. 1 1
      lib/python/temporal/c_libraries_interface.py
  20. 1 1
      lib/python/temporal/core.py
  21. 2 2
      lib/python/temporal/gui_support.py
  22. 0 1
      lib/python/temporal/list_stds.py
  23. 0 1
      lib/python/temporal/metadata.py
  24. 0 3
      lib/python/temporal/space_time_datasets.py
  25. 0 2
      lib/python/temporal/spatial_extent.py
  26. 0 2
      lib/python/temporal/temporal_extent.py
  27. 0 1
      lib/python/temporal/temporal_granularity.py
  28. 0 1
      lib/python/temporal/temporal_raster3d_algebra.py
  29. 0 1
      lib/python/temporal/temporal_raster_algebra.py
  30. 1 7
      lib/python/temporal/temporal_raster_base_algebra.py
  31. 0 1
      lib/python/temporal/temporal_vector_algebra.py
  32. 2 2
      scripts/.flake8
  33. 2 2
      scripts/d.frame/d.frame.py
  34. 0 1
      scripts/d.polar/d.polar.py
  35. 1 1
      scripts/d.rast.edit/d.rast.edit.py
  36. 1 1
      scripts/g.extension/g.extension.py
  37. 0 1
      scripts/g.search.modules/g.search.modules.py
  38. 0 2
      scripts/r.buffer.lowmem/r.buffer.lowmem.py
  39. 0 1
      scripts/r.fillnulls/r.fillnulls.py
  40. 0 1
      scripts/r.in.aster/r.in.aster.py
  41. 0 1
      scripts/r.in.srtm/r.in.srtm.py
  42. 1 2
      scripts/r.in.wms/wms_drv.py
  43. 0 2
      scripts/r.in.wms/wms_gdal_drv.py
  44. 0 1
      scripts/r.unpack/r.unpack.py
  45. 1 1
      scripts/v.clip/v.clip.py
  46. 0 2
      scripts/v.db.addcolumn/v.db.addcolumn.py
  47. 0 2
      scripts/v.db.dropcolumn/v.db.dropcolumn.py
  48. 0 2
      scripts/v.db.renamecolumn/v.db.renamecolumn.py
  49. 1 1
      scripts/v.dissolve/v.dissolve.py
  50. 0 1
      scripts/v.in.lines/v.in.lines.py
  51. 0 1
      scripts/v.pack/v.pack.py
  52. 0 1
      scripts/wxpyimgview/wxpyimgview.py
  53. 0 1
      scripts/wxpyimgview/wxpyimgview_gui.py

+ 10 - 4
lib/python/.flake8

@@ -21,10 +21,8 @@ ignore =
     E501, # line too long (183 > 150 characters)
     E722, # do not use bare 'except'
     E741, # ambiguous variable name 'l'
-    F401, # '.reader.BandReferenceReader' imported but unused
     F403, # 'from ctypes import *' used; unable to detect undefined names
     F405, # 'RasterRow' may be undefined, or defined from star imports: ctypes, grass.pygrass.raster, grass.pygrass.vector
-    F821, # undefined name '_'
     F841, # local variable 't0' is assigned to but never used
     W293, # blank line contains whitespace
     W503, # line break before binary operator
@@ -39,10 +37,15 @@ per-file-ignores =
     pygrass/utils.py: E402,
     # Current benchmarks/tests are changing sys.path before import.
     # Possibly, a different approach should be taken there anyway.
-    pygrass/tests/benchmark.py: E402,
+    pygrass/tests/benchmark.py: E402, F401, F821
     # Configuration file for Sphinx:
     # Ignoring import/code mix and line length.
-    docs/conf.py: E402, E501
+    docs/conf.py: E402, E501,
+    # Unused imports
+    */__init__.py: F401,
+    */*/__init__.py: F401,
+    */*/*/__init__.py: F401
+
 
 max-line-length = 88
 exclude =
@@ -58,3 +61,6 @@ exclude =
     ctypes,
     pydispatch,
     testsuite,
+
+builtins =
+    _

+ 0 - 1
lib/python/bandref/reader.py

@@ -5,7 +5,6 @@ import glob
 import re
 from collections import OrderedDict
 
-import grass.script as gs
 
 # band reference should be required to have the format
 # <shortcut>_<band>

+ 1 - 2
lib/python/gunittest/checkers.py

@@ -15,7 +15,7 @@ import re
 import doctest
 import hashlib
 
-from grass.script.utils import decode, encode, _get_encoding
+from grass.script.utils import encode
 
 try:
     from grass.script.core import KeyValue
@@ -84,7 +84,6 @@ def unify_units(dic):
               ]
     dic = dict(dic)
     for l in lookup:
-        import types
         if not isinstance(dic['unit'], str):
             for n in range(len(dic['unit'])):
                 if dic['unit'][n] in l:

+ 1 - 1
lib/python/gunittest/invoker.py

@@ -24,7 +24,7 @@ from .reporters import (GrassTestFilesMultiReporter,
                         NoopFileAnonymizer, keyvalue_to_text)
 from .utils import silent_rmtree, ensure_dir
 
-from grass.script.utils import decode, encode, _get_encoding
+from grass.script.utils import decode, _get_encoding
 
 try:
     from string import maketrans

+ 0 - 1
lib/python/gunittest/multirunner.py

@@ -14,7 +14,6 @@ from __future__ import print_function
 import sys
 import os
 import argparse
-import itertools
 import subprocess
 import locale
 

+ 6 - 14
lib/python/imaging/images2swf.py

@@ -69,7 +69,6 @@ sources and tools:
 
 import os
 import sys
-import time
 import zlib
 
 try:
@@ -85,20 +84,13 @@ except ImportError:
 
 # True if we are running on Python 3.
 # Code taken from six.py by Benjamin Peterson (MIT licensed)
-import types
 PY3 = sys.version_info[0] == 3
-if PY3:
-    string_types = str,
-    integer_types = int,
-    class_types = type,
-    text_type = str
-    binary_type = bytes
-else:
-    string_types = basestring,
-    integer_types = (int, long)
-    class_types = (type, types.ClassType)
-    text_type = unicode
-    binary_type = str
+
+string_types = str,
+integer_types = int,
+class_types = type,
+text_type = str
+binary_type = bytes
 
 
 # todo: use imageio/FreeImage to support reading JPEG images from SWF?

+ 0 - 5
lib/python/imaging/operations.py

@@ -58,11 +58,6 @@ for details.
 try:
     import PIL
     from PIL import Image
-    PILLOW = True
-    try:
-        from PIL import PILLOW_VERSION  # pylint: disable=unused-import
-    except ImportError:
-        PILLOW = False
     try:
         import PIL.ImageOps as ImageOps
     except ImportError:

+ 1 - 2
lib/python/pygrass/errors.py

@@ -1,8 +1,7 @@
 # -*- coding: utf-8 -*-
 from functools import wraps
 
-from grass.exceptions import (FlagError, ParameterError, DBError,
-                              GrassError, OpenError)
+from grass.exceptions import GrassError
 
 from grass.pygrass.messages import get_msgr
 import grass.lib.gis as libgis

+ 1 - 1
lib/python/pygrass/gis/region.py

@@ -13,7 +13,7 @@ import grass.script as grass
 
 from grass.pygrass.errors import GrassError
 from grass.pygrass.shell.conversion import dict2html
-from grass.pygrass.utils import get_mapset_vector, get_mapset_raster
+from grass.pygrass.utils import get_mapset_raster
 
 test_vector_name = "Region_test_vector"
 test_raster_name = "Region_test_raster"

+ 2 - 1
lib/python/pygrass/raster/__init__.py

@@ -8,6 +8,7 @@ import numpy as np
 # import GRASS modules
 #
 from grass.script import fatal
+from grass.exceptions import OpenError
 
 import grass.lib.gis as libgis
 import grass.lib.raster as libraster
@@ -18,7 +19,7 @@ libgis.G_gisinit('')
 #
 # import pygrass modules
 #
-from grass.pygrass.errors import OpenError, must_be_open
+from grass.pygrass.errors import must_be_open
 from grass.pygrass.gis.region import Region
 from grass.pygrass import utils
 

+ 2 - 1
lib/python/pygrass/vector/abstract.py

@@ -10,9 +10,10 @@ import grass.lib.vector as libvect
 from grass.pygrass.vector.vector_type import MAPTYPE
 
 from grass.pygrass import utils
-from grass.pygrass.errors import GrassError, OpenError, must_be_open
+from grass.pygrass.errors import must_be_open
 from grass.pygrass.vector.table import DBlinks, Link
 from grass.pygrass.vector.find import PointFinder, BboxFinder, PolygonFinder
+from grass.exceptions import GrassError, OpenError
 
 test_vector_name = "abstract_doctest_map"
 

+ 1 - 1
lib/python/pygrass/vector/find.py

@@ -9,7 +9,7 @@ import grass.lib.vector as libvect
 from grass.pygrass.errors import must_be_open
 
 from grass.pygrass.vector.basic import Ilist, BoxList
-from grass.pygrass.vector.geometry import read_line, Isle, Area, Point, Node
+from grass.pygrass.vector.geometry import read_line, Isle, Area, Node
 
 # For test purposes
 test_vector_name = "find_doctest_map"

+ 1 - 1
lib/python/pygrass/vector/table.py

@@ -22,7 +22,7 @@ except:
 
 import grass.lib.vector as libvect
 from grass.pygrass.gis import Mapset
-from grass.pygrass.errors import DBError
+from grass.exceptions import DBError
 from grass.pygrass.utils import table_exist, decode
 from grass.script.db import db_table_in_vector
 from grass.script.core import warning

+ 1 - 1
lib/python/pygrass/vector/vector_type.py

@@ -6,7 +6,7 @@ Created on Wed Jul 18 10:49:26 2012
 """
 
 import grass.lib.vector as libvect
-from grass.pygrass.vector import geometry as geo
+
 
 MAPTYPE = {libvect.GV_FORMAT_NATIVE: "native",
            libvect.GV_FORMAT_OGR: "OGR",

+ 0 - 1
lib/python/script/core.py

@@ -29,7 +29,6 @@ import string
 import random
 import pipes
 from tempfile import NamedTemporaryFile
-import types as python_types
 
 from .utils import KeyValue, parse_key_val, basename, encode, decode, try_remove
 from grass.exceptions import ScriptError, CalledModuleError

+ 1 - 2
lib/python/script/task.py

@@ -19,9 +19,8 @@ for details.
 """
 import re
 import sys
-import string
 
-from .utils import encode, decode, split
+from .utils import decode, split
 from .core import *
 
 

+ 2 - 9
lib/python/script/vector.py

@@ -18,20 +18,13 @@ for details.
 """
 from __future__ import absolute_import
 import os
-import types
-
-try:
-    import __builtin__
-    bytes = str
-except ImportError:
-    # python3
-    import builtins as __builtin__
-    unicode = str
 
 from .utils import parse_key_val
 from .core import *
 from grass.exceptions import CalledModuleError
 
+unicode = str
+
 
 def vector_db(map, env=None, **kwargs):
     """Return the database connection details for a vector map

+ 1 - 1
lib/python/temporal/base.py

@@ -27,7 +27,7 @@ for details.
 from __future__ import print_function
 from datetime import datetime
 from .core import get_tgis_message_interface, get_tgis_dbmi_paramstyle, \
-    SQLDatabaseInterfaceConnection, init, get_current_mapset
+    SQLDatabaseInterfaceConnection
 
 ###############################################################################
 

+ 1 - 1
lib/python/temporal/c_libraries_interface.py

@@ -27,7 +27,7 @@ from grass.pygrass.rpc.base import RPCServerBase
 from grass.pygrass.raster import RasterRow
 from grass.pygrass.vector import VectorTopo
 from grass.script.utils import encode
-from grass.pygrass.utils import decode, set_path
+from grass.pygrass.utils import decode
 
 ###############################################################################
 

+ 1 - 1
lib/python/temporal/core.py

@@ -35,7 +35,7 @@ import grass.script as gscript
 
 from .c_libraries_interface import *
 from grass.pygrass import messages
-from grass.script.utils import decode, encode
+from grass.script.utils import decode
 # Import all supported database backends
 # Ignore import errors since they are checked later
 try:

+ 2 - 2
lib/python/temporal/gui_support.py

@@ -46,14 +46,14 @@ def tlist_grouped(type, group_type=False, dbif=None):
         try:
             tlist_result = tlist(type=type, dbif=dbif)
         except gscript.ScriptError as e:
-            warning(e)
+            gscript.warning(e)
             continue
 
         for line in tlist_result:
             try:
                 name, mapset = line.split('@')
             except ValueError:
-                warning(_("Invalid element '%s'") % line)
+                gscript.warning(_("Invalid element '%s'") % line)
                 continue
 
             if mapset not in result:

+ 0 - 1
lib/python/temporal/list_stds.py

@@ -20,7 +20,6 @@ for details.
 from __future__ import print_function
 from .core import get_tgis_message_interface, get_available_temporal_mapsets, init_dbif
 from .datetime_math import time_delta_to_relative_time
-from .space_time_datasets import RasterDataset
 from .factory import dataset_factory
 from .open_stds import open_old_stds
 import grass.script as gscript

+ 0 - 1
lib/python/temporal/metadata.py

@@ -23,7 +23,6 @@ for details.
 """
 from __future__ import print_function
 from .base import SQLDatabaseInterface
-from .core import init
 
 ###############################################################################
 

+ 0 - 3
lib/python/temporal/space_time_datasets.py

@@ -9,8 +9,6 @@ for details.
 :authors: Soeren Gebbert
 """
 import getpass
-from datetime import datetime
-from .core import get_current_mapset
 from .abstract_map_dataset import AbstractMapDataset
 from .abstract_space_time_dataset import AbstractSpaceTimeDataset
 from .base import Raster3DBase, RasterBase, VectorBase, STR3DSBase, STVDSBase, STRDSBase,\
@@ -23,7 +21,6 @@ from .temporal_extent import RasterAbsoluteTime, RasterRelativeTime, Raster3DAbs
     Raster3DRelativeTime, VectorAbsoluteTime, VectorRelativeTime, STRDSAbsoluteTime,\
     STRDSRelativeTime, STR3DSAbsoluteTime, STR3DSRelativeTime, STVDSAbsoluteTime, STVDSRelativeTime
 import grass.script.array as garray
-from .core import init
 
 
 ###############################################################################

+ 0 - 2
lib/python/temporal/spatial_extent.py

@@ -35,8 +35,6 @@ for details.
 """
 from __future__ import print_function
 from .base import SQLDatabaseInterface
-from .core import init
-from datetime import datetime
 
 
 class SpatialExtent(SQLDatabaseInterface):

+ 0 - 2
lib/python/temporal/temporal_extent.py

@@ -21,8 +21,6 @@ for details.
 """
 from __future__ import print_function
 from .base import SQLDatabaseInterface
-from .core import init
-from datetime import datetime
 
 ###############################################################################
 

+ 0 - 1
lib/python/temporal/temporal_granularity.py

@@ -19,7 +19,6 @@ for details.
 """
 from __future__ import print_function
 from .datetime_math import *
-from .core import get_tgis_message_interface
 from functools import reduce
 from collections import OrderedDict
 import ast

+ 0 - 1
lib/python/temporal/temporal_raster3d_algebra.py

@@ -13,7 +13,6 @@ for details.
 from __future__ import print_function
 
 try:
-    import ply.lex as lex
     import ply.yacc as yacc
 except:
     pass

+ 0 - 1
lib/python/temporal/temporal_raster_algebra.py

@@ -54,7 +54,6 @@ for details.
 from __future__ import print_function
 
 try:
-    import ply.lex as lex
     import ply.yacc as yacc
 except:
     pass

+ 1 - 7
lib/python/temporal/temporal_raster_base_algebra.py

@@ -42,12 +42,6 @@ for details.
 """
 from __future__ import print_function
 
-try:
-    import ply.lex as lex
-    import ply.yacc as yacc
-except:
-    pass
-
 import copy
 import grass.pygrass.modules as pymod
 from grass.exceptions import FatalError
@@ -748,7 +742,7 @@ class TemporalRasterBaseAlgebraParser(TemporalAlgebraParser):
                     register_list.append(map_i)
 
                 # Open connection to temporal database.
-                dbif, _ = init_dbif(self.dbif)
+                dbif, unused = init_dbif(self.dbif)
 
                 # Create result space time dataset.
                 if self.dry_run is False:

+ 0 - 1
lib/python/temporal/temporal_vector_algebra.py

@@ -44,7 +44,6 @@ for details.
 from __future__ import print_function
 
 try:
-    import ply.lex as lex
     import ply.yacc as yacc
 except:
     pass

+ 2 - 2
scripts/.flake8

@@ -5,8 +5,6 @@ ignore =
     E402, # module level import not at top of file
     E722, # do not use bare 'except'
     E741, # ambiguous variable name 'l'
-    F401, # 'grass.script.core.gisenv' imported but unused
-    F821, # undefined name '_'
     F841, # local variable 'center' is assigned to but never used
     E121, # continuation line under-indented for hanging indent
     E125, # continuation line with same indent as next logical line
@@ -44,3 +42,5 @@ exclude =
     ctypes,
     pydispatch,
     testsuite,
+builtins =
+    _

+ 2 - 2
scripts/d.frame/d.frame.py

@@ -68,7 +68,7 @@
 import os
 import sys
 
-from grass.script.core import parser, read_command, fatal, debug, run_command, gisenv, warning, parse_command
+from grass.script.core import fatal, parse_command, parser, read_command, run_command, warning
 
 # check if monitor is running
 
@@ -101,7 +101,7 @@ def read_monitor_file(monitor, ftype='env'):
 def check_monitor_file(monitor, ftype='env'):
     mfile = parse_command('d.mon', flags='g').get(ftype, None)
     if mfile is None or not os.path.isfile(mfile):
-        fatal(_("Unable to get monitor info (no %s found)") % var)
+        fatal(_("Unable to get monitor info"))
 
     return mfile
 

+ 0 - 1
scripts/d.polar/d.polar.py

@@ -44,7 +44,6 @@
 
 import os
 import string
-import types
 import math
 import atexit
 import glob

+ 1 - 1
scripts/d.rast.edit/d.rast.edit.py

@@ -659,7 +659,7 @@ def wxGUI():
             if self.angles:
                 self.status['aspect'] = self.angles[row][col]
 
-        def force_color(val):
+        def force_color(self, val):
             run('g.region', rows=1, cols=1)
             run('r.mapcalc', expression="%s = %d" % (self.tempmap, val))
             run('r.colors', map=self.tempmap, rast=self.inmap)

+ 1 - 1
scripts/g.extension/g.extension.py

@@ -682,7 +682,7 @@ def get_wxgui_extensions(url):
         grass.warning(_("Unable to fetch '%s'") % url)
         return
 
-    for line in file.readlines():
+    for line in file_.readlines():
         # list extensions
         sline = pattern.search(line)
         if not sline:

+ 0 - 1
scripts/g.search.modules/g.search.modules.py

@@ -67,7 +67,6 @@ from __future__ import print_function
 import os
 import sys
 
-from grass.script.utils import diff_files, try_rmdir
 from grass.script import core as grass
 from grass.exceptions import CalledModuleError
 

+ 0 - 2
scripts/r.buffer.lowmem/r.buffer.lowmem.py

@@ -41,10 +41,8 @@
 # % answer: meters
 # %end
 
-import sys
 import os
 import atexit
-import math
 import grass.script as grass
 from grass.script.utils import encode
 

+ 0 - 1
scripts/r.fillnulls/r.fillnulls.py

@@ -101,7 +101,6 @@
 # %end
 
 
-import sys
 import os
 import atexit
 import subprocess

+ 0 - 1
scripts/r.in.aster/r.in.aster.py

@@ -51,7 +51,6 @@
 # % description: Base name for output raster map (band number will be appended to base name)
 # %end
 
-import sys
 import os
 import platform
 import grass.script as grass

+ 0 - 1
scripts/r.in.srtm/r.in.srtm.py

@@ -133,7 +133,6 @@ import os
 import shutil
 import atexit
 import grass.script as grass
-from grass.exceptions import CalledModuleError
 import zipfile as zfile
 
 

+ 1 - 2
scripts/r.in.wms/wms_drv.py

@@ -23,7 +23,6 @@ from time import sleep
 
 try:
     from osgeo import gdal
-    from osgeo import gdalconst
 except:
     grass.fatal(_("Unable to load GDAL Python bindings (requires package 'python-gdal' being installed)"))
 
@@ -201,7 +200,7 @@ class WMSDrv(WMSBase):
                 metadata = driver.GetMetadata()
                 if gdal.DCAP_CREATE not in metadata or \
                         metadata[gdal.DCAP_CREATE] == 'NO':
-                    grass.fatal(_('Driver %s does not supports Create() method') % drv_format)
+                    grass.fatal(_('Driver %s does not supports Create() method') % self.gdal_drv_format)
                 self.temp_map_bands_num = tile_dataset.RasterCount
                 temp_map_dataset = driver.Create(temp_map, map_region['cols'], map_region['rows'],
                                                  self.temp_map_bands_num,

+ 0 - 2
scripts/r.in.wms/wms_gdal_drv.py

@@ -13,12 +13,10 @@ This program is free software under the GNU General Public License
 @author Stepan Turek <stepan.turek seznam.cz> (Mentor: Martin Landa)
 """
 
-import os
 import grass.script as grass
 
 try:
     from osgeo import gdal
-    from osgeo import gdalconst
 except:
     grass.fatal(_("Unable to load GDAL Python bindings (requires package 'python-gdal' being installed)"))
 

+ 0 - 1
scripts/r.unpack/r.unpack.py

@@ -41,7 +41,6 @@
 # %end
 
 import os
-import re
 import sys
 import shutil
 import tarfile

+ 1 - 1
scripts/v.clip/v.clip.py

@@ -56,7 +56,7 @@ import os
 import sys
 import atexit
 
-from grass.script import run_command, message, parser
+from grass.script import parser
 import grass.script as grass
 from grass.exceptions import CalledModuleError
 

+ 0 - 2
scripts/v.db.addcolumn/v.db.addcolumn.py

@@ -40,8 +40,6 @@
 # % key_desc: name type
 # %end
 
-import sys
-import os
 import grass.script as grass
 from grass.script.utils import encode
 

+ 0 - 2
scripts/v.db.dropcolumn/v.db.dropcolumn.py

@@ -37,8 +37,6 @@
 # % required: yes
 # %end
 
-import sys
-import os
 import string
 import grass.script as grass
 from grass.exceptions import CalledModuleError

+ 0 - 2
scripts/v.db.renamecolumn/v.db.renamecolumn.py

@@ -40,8 +40,6 @@
 # % key_desc: oldcol,newcol
 # %end
 
-import sys
-import os
 import grass.script as grass
 
 

+ 1 - 1
scripts/v.dissolve/v.dissolve.py

@@ -33,7 +33,7 @@
 # %end
 # %option G_OPT_V_OUTPUT
 # %end
-import sys
+
 import os
 import atexit
 

+ 0 - 1
scripts/v.in.lines/v.in.lines.py

@@ -37,7 +37,6 @@
 import sys
 import os
 import atexit
-import string
 from grass.script.utils import separator, try_remove
 from grass.script import core as grass
 

+ 0 - 1
scripts/v.pack/v.pack.py

@@ -35,7 +35,6 @@
 
 import os
 import sys
-import shutil
 import tarfile
 import atexit
 

+ 0 - 1
scripts/wxpyimgview/wxpyimgview.py

@@ -37,7 +37,6 @@
 # % answer: 10
 # %end
 
-import sys
 import os
 import grass.script as grass
 

+ 0 - 1
scripts/wxpyimgview/wxpyimgview_gui.py

@@ -36,7 +36,6 @@
 # % answer: 10
 # %end
 
-import os
 import signal
 import struct
 import sys