imagepy icon indicating copy to clipboard operation
imagepy copied to clipboard

Missing imports? 23 undefined names

Open cclauss opened this issue 6 years ago • 0 comments

flake8 testing of https://github.com/Image-Py/imagepy on Python 3.7.1

$ flake8 . --count --select=E901,E999,F821,F822,F823 --show-source --statistics

./imagepy/ui/tablewindow.py:289:10: F821 undefined name 'TableFrame'
    tf = TableFrame()
         ^
./imagepy/ui/mainframe.py:136:43: F821 undefined name 'waui'
        self.auimgr.AddPane( self.devpan, waui.AuiPaneInfo() .Bottom() .CaptionVisible( False ).PinButton( True ).Dock()
                                          ^
./imagepy/ui/canvas.py:304:24: F821 undefined name 'TestTool'
    canvas.set_handler(TestTool())
                       ^
./imagepy/ui/widgets/curvepanel.py:105:28: F821 undefined name 'x1'
        self.x1, self.x2 = x1, x2
                           ^
./imagepy/ui/widgets/curvepanel.py:105:32: F821 undefined name 'x2'
        self.x1, self.x2 = x1, x2
                               ^
./imagepy/ui/widgets/normal.py:15:68: F821 undefined name 'key'
        self.ctrl.Bind(wx.EVT_KEY_UP, lambda x : self.para_changed(key))
                                                                   ^
./imagepy/ui/widgets/cmappanel.py:127:28: F821 undefined name 'x1'
        self.x1, self.x2 = x1, x2
                           ^
./imagepy/ui/widgets/cmappanel.py:127:32: F821 undefined name 'x2'
        self.x1, self.x2 = x1, x2
                               ^
./imagepy/menus/Plugins/Games/drawstep_plg.py:14:30: F821 undefined name 'ColorManager'
    if color == None:color = ColorManager.get_front()
                             ^
./imagepy/menus/Plugins/Games/drawstep_plg.py:21:30: F821 undefined name 'ColorManager'
    if color == None:color = ColorManager.get_front()
                             ^
./imagepy/menus/File/open_plg.py:45:11: F821 undefined name 'Plugin'
    print(Plugin.title)
          ^
./imagepy/menus/File/open_plg.py:47:5: F821 undefined name 'Plugin'
    Plugin().run()    ^
./imagepy/menus/File/GIF/animate_plgs.py:30:10: F821 undefined name 'Image'
		imgs = Image.open(para['path'])
         ^
./imagepy/menus/File/GIF/animate_plgs.py:31:10: F821 undefined name 'ImageSequence'
		imgs = ImageSequence.Iterator(imgs)
         ^
./imagepy/core/manager/languagemanager.py:83:5: F821 undefined name 'ShotcutManager'
    ShotcutManager.rm('c')
    ^
./imagepy/core/manager/languagemanager.py:84:11: F821 undefined name 'ShotcutManager'
    print(ShotcutManager.shotcuts)
          ^
./imagepy/core/manager/languagemanager.py:85:5: F821 undefined name 'ShotcutManager'
    ShotcutManager.write()
    ^
./imagepy/core/engine/mkdown.py:15:8: F821 undefined name 'wx'
	app = wx.App()
       ^
./imagepy/core/engine/mkdown.py:16:2: F821 undefined name 'show_help'
	show_help('title', 'abc', '')
 ^
./imagepy/core/roi/pointroi.py:96:9: F821 undefined name 'Polygon'
    p = Polygon(seq)
        ^
./imagepy/core/roi/pointroi.py:97:10: F821 undefined name 'toSegment'
    mp = toSegment(seq)         ^
./imagepy/core/myvi/manager.py:275:2: F821 undefined name 'build_surf2d'
	build_surf2d(img) ^
./imagepy/tools/Measure/profile_tol.py:159:13: F821 undefined name 'PlotFrame'
    frame = PlotFrame(None)
            ^
23    F821 undefined name 'wx'
23

E901,E999,F821,F822,F823 are the "showstopper" flake8 issues that can halt the runtime with a SyntaxError, NameError, etc. Most other flake8 issues are merely "style violations" -- useful for readability but they do not effect runtime safety.

  • F821: undefined name name
  • F822: undefined name name in __all__
  • F823: local variable name referenced before assignment
  • E901: SyntaxError or IndentationError
  • E999: SyntaxError -- failed to compile a file into an Abstract Syntax Tree

cclauss avatar Dec 30 '18 09:12 cclauss