Removed flake8 issues

This commit is contained in:
Salvador E. Tropea 2020-06-23 10:27:11 -03:00
parent d68376ba2e
commit 458d4ba0a9
8 changed files with 26 additions and 21 deletions

View File

@ -5,10 +5,12 @@ def my_decorator(func):
print("Something is happening after the function is called.")
return wrapper
@my_decorator
def say_whee():
print("Whee!")
class PP(object):
""" Class PP bla bla """
def __init__(self):

View File

@ -1,4 +1,4 @@
from mymacros import macros, document
from mymacros import macros, document # noqa: F401
with document:
# comentario a
@ -9,6 +9,7 @@ with document:
c = 3
""" docu c """
class d(object):
def __init__(self):
with document:
@ -16,9 +17,8 @@ class d(object):
""" documenting d.at1 """
print("a = "+str(a)+" # "+_help_a)
print("b = "+str(b)+" # "+_help_b)
print("c = "+str(c)+" # "+_help_c)
print("a = "+str(a)+" # "+_help_a) # noqa: F821
print("b = "+str(b)+" # "+_help_b) # noqa: F821
print("c = "+str(c)+" # "+_help_c) # noqa: F821
e = d()
print("e.at1 = "+str(e.at1)+" # "+e._help_at1)
print("e.at1 = "+str(e.at1)+" # "+e._help_at1) # noqa: F821

View File

@ -1,8 +1,9 @@
from macropy.core.macros import Macros
from ast import *
from ast import (Assign, Name, Attribute, Expr, Num, Str, NameConstant, Load, Store)
macros = Macros()
@macros.block
def document(tree, **kw):
""" This macro takes literal strings and converts them into:
@ -19,7 +20,7 @@ def document(tree, **kw):
# The whole sentence is a string?
if (isinstance(s, Expr) and isinstance(s.value, Str) and
# and the previous is an assign
isinstance(prev, Assign)):
isinstance(prev, Assign)): # noqa: E128
# Apply it to the first target
target = prev.targets[0]
value = prev.value

View File

@ -1,3 +1,3 @@
#!/usr/bin/python3
import macropy.activate
import application
import macropy.activate # noqa: F401
import application # noqa: F401

View File

@ -1,4 +1,5 @@
from mymacros import macros, document
from mymacros import macros, document # noqa: F401
with document:
# comentario a
@ -9,6 +10,7 @@ with document:
c = 3
""" docu c """
class d(object):
def __init__(self):
with document:
@ -16,9 +18,8 @@ class d(object):
""" documenting d.at1 """
print("a = "+str(a)+" # "+_help_a)
print("b = "+str(b)+" # "+_help_b)
print("c = "+str(c)+" # "+_help_c)
print("a = "+str(a)+" # "+_help_a) # noqa: F821
print("b = "+str(b)+" # "+_help_b) # noqa: F821
print("c = "+str(c)+" # "+_help_c) # noqa: F821
e = d()
print("e.at1 = "+str(e.at1)+" # "+e._help_at1)
print("e.at1 = "+str(e.at1)+" # "+e._help_at1) # noqa: F821

View File

@ -1,4 +1,5 @@
from ast import *
from ast import (Assign, Name, Attribute, Expr, Num, Str, NameConstant, Load, Store)
def document(sentences, to_source, **kw):
""" This macro takes literal strings and converts them into:
@ -15,7 +16,7 @@ def document(sentences, to_source, **kw):
# The whole sentence is a string?
if (isinstance(s, Expr) and isinstance(s.value, Str) and
# and the previous is an assign
isinstance(prev, Assign)):
isinstance(prev, Assign)): # noqa: E128
# Apply it to the first target
target = prev.targets[0]
value = prev.value

View File

@ -1,3 +1,3 @@
#!/usr/bin/python3
import mcpy.activate
import application
import mcpy.activate # noqa: F401
import application # noqa: F401

View File

@ -10,7 +10,7 @@ import pcbnew
from .error import (KiPlotConfigurationError)
from .kiplot import (Layer, get_layer_id_from_pcb)
from .misc import (NO_YAML_MODULE, EXIT_BAD_CONFIG)
from mcpy import activate
from mcpy import activate # noqa: F401
# Output classes
from .out_base import BaseOutput
from . import out_gerber # noqa: F401