浏览代码

wxGUI: fix menustrings generation and adjust flake8 (#541)

Anna Petrasova 5 年之前
父节点
当前提交
1fbfd5f6bc
共有 2 个文件被更改,包括 1 次插入2 次删除
  1. 0 1
      gui/wxpython/.flake8
  2. 1 1
      gui/wxpython/core/menutree.py

+ 0 - 1
gui/wxpython/.flake8

@@ -7,7 +7,6 @@ ignore =
     E722, # do not use bare 'except'
     E722, # do not use bare 'except'
     E731, # do not assign a lambda expression, use a def
     E731, # do not assign a lambda expression, use a def
     E741, # ambiguous variable name 'l'
     E741, # ambiguous variable name 'l'
-    E999, # SyntaxError: EOL while scanning string literal
     F401, # 'animation.utils.getCpuCount' imported but unused
     F401, # 'animation.utils.getCpuCount' imported but unused
     F403, # 'from gmodeler.model import *' used; unable to detect undefined names
     F403, # 'from gmodeler.model import *' used; unable to detect undefined names
     F405, # '_' may be undefined, or defined from star imports: gmodeler.model
     F405, # '_' may be undefined, or defined from star imports: gmodeler.model

+ 1 - 1
gui/wxpython/core/menutree.py

@@ -171,7 +171,7 @@ class MenuTreeModelBuilder:
 
 
         :param fh: file descriptor
         :param fh: file descriptor
         """
         """
-        className = str(self.__class__).split('.', 1)[1]
+        className = self.__class__.__name__
         fh.write('menustrings_%s = [\n' % className)
         fh.write('menustrings_%s = [\n' % className)
         for child in self.model.root.children:
         for child in self.model.root.children:
             printStrings(child, fh)
             printStrings(child, fh)