Removed flake8 issues
This commit is contained in:
parent
d68376ba2e
commit
458d4ba0a9
|
|
@ -5,10 +5,12 @@ def my_decorator(func):
|
||||||
print("Something is happening after the function is called.")
|
print("Something is happening after the function is called.")
|
||||||
return wrapper
|
return wrapper
|
||||||
|
|
||||||
|
|
||||||
@my_decorator
|
@my_decorator
|
||||||
def say_whee():
|
def say_whee():
|
||||||
print("Whee!")
|
print("Whee!")
|
||||||
|
|
||||||
|
|
||||||
class PP(object):
|
class PP(object):
|
||||||
""" Class PP bla bla """
|
""" Class PP bla bla """
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
from mymacros import macros, document
|
from mymacros import macros, document # noqa: F401
|
||||||
|
|
||||||
with document:
|
with document:
|
||||||
# comentario a
|
# comentario a
|
||||||
|
|
@ -9,6 +9,7 @@ with document:
|
||||||
c = 3
|
c = 3
|
||||||
""" docu c """
|
""" docu c """
|
||||||
|
|
||||||
|
|
||||||
class d(object):
|
class d(object):
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
with document:
|
with document:
|
||||||
|
|
@ -16,9 +17,8 @@ class d(object):
|
||||||
""" documenting d.at1 """
|
""" documenting d.at1 """
|
||||||
|
|
||||||
|
|
||||||
print("a = "+str(a)+" # "+_help_a)
|
print("a = "+str(a)+" # "+_help_a) # noqa: F821
|
||||||
print("b = "+str(b)+" # "+_help_b)
|
print("b = "+str(b)+" # "+_help_b) # noqa: F821
|
||||||
print("c = "+str(c)+" # "+_help_c)
|
print("c = "+str(c)+" # "+_help_c) # noqa: F821
|
||||||
e = d()
|
e = d()
|
||||||
print("e.at1 = "+str(e.at1)+" # "+e._help_at1)
|
print("e.at1 = "+str(e.at1)+" # "+e._help_at1) # noqa: F821
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,9 @@
|
||||||
from macropy.core.macros import Macros
|
from macropy.core.macros import Macros
|
||||||
from ast import *
|
from ast import (Assign, Name, Attribute, Expr, Num, Str, NameConstant, Load, Store)
|
||||||
|
|
||||||
macros = Macros()
|
macros = Macros()
|
||||||
|
|
||||||
|
|
||||||
@macros.block
|
@macros.block
|
||||||
def document(tree, **kw):
|
def document(tree, **kw):
|
||||||
""" This macro takes literal strings and converts them into:
|
""" This macro takes literal strings and converts them into:
|
||||||
|
|
@ -19,7 +20,7 @@ def document(tree, **kw):
|
||||||
# The whole sentence is a string?
|
# The whole sentence is a string?
|
||||||
if (isinstance(s, Expr) and isinstance(s.value, Str) and
|
if (isinstance(s, Expr) and isinstance(s.value, Str) and
|
||||||
# and the previous is an assign
|
# and the previous is an assign
|
||||||
isinstance(prev, Assign)):
|
isinstance(prev, Assign)): # noqa: E128
|
||||||
# Apply it to the first target
|
# Apply it to the first target
|
||||||
target = prev.targets[0]
|
target = prev.targets[0]
|
||||||
value = prev.value
|
value = prev.value
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,3 @@
|
||||||
#!/usr/bin/python3
|
#!/usr/bin/python3
|
||||||
import macropy.activate
|
import macropy.activate # noqa: F401
|
||||||
import application
|
import application # noqa: F401
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,5 @@
|
||||||
from mymacros import macros, document
|
from mymacros import macros, document # noqa: F401
|
||||||
|
|
||||||
|
|
||||||
with document:
|
with document:
|
||||||
# comentario a
|
# comentario a
|
||||||
|
|
@ -9,6 +10,7 @@ with document:
|
||||||
c = 3
|
c = 3
|
||||||
""" docu c """
|
""" docu c """
|
||||||
|
|
||||||
|
|
||||||
class d(object):
|
class d(object):
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
with document:
|
with document:
|
||||||
|
|
@ -16,9 +18,8 @@ class d(object):
|
||||||
""" documenting d.at1 """
|
""" documenting d.at1 """
|
||||||
|
|
||||||
|
|
||||||
print("a = "+str(a)+" # "+_help_a)
|
print("a = "+str(a)+" # "+_help_a) # noqa: F821
|
||||||
print("b = "+str(b)+" # "+_help_b)
|
print("b = "+str(b)+" # "+_help_b) # noqa: F821
|
||||||
print("c = "+str(c)+" # "+_help_c)
|
print("c = "+str(c)+" # "+_help_c) # noqa: F821
|
||||||
e = d()
|
e = d()
|
||||||
print("e.at1 = "+str(e.at1)+" # "+e._help_at1)
|
print("e.at1 = "+str(e.at1)+" # "+e._help_at1) # noqa: F821
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -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):
|
def document(sentences, to_source, **kw):
|
||||||
""" This macro takes literal strings and converts them into:
|
""" 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?
|
# The whole sentence is a string?
|
||||||
if (isinstance(s, Expr) and isinstance(s.value, Str) and
|
if (isinstance(s, Expr) and isinstance(s.value, Str) and
|
||||||
# and the previous is an assign
|
# and the previous is an assign
|
||||||
isinstance(prev, Assign)):
|
isinstance(prev, Assign)): # noqa: E128
|
||||||
# Apply it to the first target
|
# Apply it to the first target
|
||||||
target = prev.targets[0]
|
target = prev.targets[0]
|
||||||
value = prev.value
|
value = prev.value
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,3 @@
|
||||||
#!/usr/bin/python3
|
#!/usr/bin/python3
|
||||||
import mcpy.activate
|
import mcpy.activate # noqa: F401
|
||||||
import application
|
import application # noqa: F401
|
||||||
|
|
|
||||||
|
|
@ -10,7 +10,7 @@ import pcbnew
|
||||||
from .error import (KiPlotConfigurationError)
|
from .error import (KiPlotConfigurationError)
|
||||||
from .kiplot import (Layer, get_layer_id_from_pcb)
|
from .kiplot import (Layer, get_layer_id_from_pcb)
|
||||||
from .misc import (NO_YAML_MODULE, EXIT_BAD_CONFIG)
|
from .misc import (NO_YAML_MODULE, EXIT_BAD_CONFIG)
|
||||||
from mcpy import activate
|
from mcpy import activate # noqa: F401
|
||||||
# Output classes
|
# Output classes
|
||||||
from .out_base import BaseOutput
|
from .out_base import BaseOutput
|
||||||
from . import out_gerber # noqa: F401
|
from . import out_gerber # noqa: F401
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue