Bläddra i källkod

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

Anna Petrasova 5 år sedan
förälder
incheckning
1fbfd5f6bc
2 ändrade filer med 1 tillägg och 2 borttagningar
  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'
     E731, # do not assign a lambda expression, use a def
     E741, # ambiguous variable name 'l'
-    E999, # SyntaxError: EOL while scanning string literal
     F401, # 'animation.utils.getCpuCount' imported but unused
     F403, # 'from gmodeler.model import *' used; unable to detect undefined names
     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
         """
-        className = str(self.__class__).split('.', 1)[1]
+        className = self.__class__.__name__
         fh.write('menustrings_%s = [\n' % className)
         for child in self.model.root.children:
             printStrings(child, fh)