diff --git a/experiments/__doc__/doc.py b/experiments/__doc__/doc.py index 54dee3fb..fd46e0f3 100644 --- a/experiments/__doc__/doc.py +++ b/experiments/__doc__/doc.py @@ -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): diff --git a/experiments/__doc__/macropy/application.py b/experiments/__doc__/macropy/application.py index cd088a21..f9a7b66a 100644 --- a/experiments/__doc__/macropy/application.py +++ b/experiments/__doc__/macropy/application.py @@ -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 diff --git a/experiments/__doc__/macropy/mymacros.py b/experiments/__doc__/macropy/mymacros.py index d31e816a..b04d37a1 100644 --- a/experiments/__doc__/macropy/mymacros.py +++ b/experiments/__doc__/macropy/mymacros.py @@ -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 diff --git a/experiments/__doc__/macropy/test_mymacros.py b/experiments/__doc__/macropy/test_mymacros.py index 8cdbd3e8..e5f1e6b7 100755 --- a/experiments/__doc__/macropy/test_mymacros.py +++ b/experiments/__doc__/macropy/test_mymacros.py @@ -1,3 +1,3 @@ #!/usr/bin/python3 -import macropy.activate -import application +import macropy.activate # noqa: F401 +import application # noqa: F401 diff --git a/experiments/__doc__/mcpy/application.py b/experiments/__doc__/mcpy/application.py index cd088a21..38084834 100644 --- a/experiments/__doc__/mcpy/application.py +++ b/experiments/__doc__/mcpy/application.py @@ -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 diff --git a/experiments/__doc__/mcpy/mymacros.py b/experiments/__doc__/mcpy/mymacros.py index 78961d93..4baf01d1 100644 --- a/experiments/__doc__/mcpy/mymacros.py +++ b/experiments/__doc__/mcpy/mymacros.py @@ -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 diff --git a/experiments/__doc__/mcpy/test_mymacros.py b/experiments/__doc__/mcpy/test_mymacros.py index c9c7e312..61dfb475 100755 --- a/experiments/__doc__/mcpy/test_mymacros.py +++ b/experiments/__doc__/mcpy/test_mymacros.py @@ -1,3 +1,3 @@ #!/usr/bin/python3 -import mcpy.activate -import application +import mcpy.activate # noqa: F401 +import application # noqa: F401 diff --git a/kiplot/config_reader.py b/kiplot/config_reader.py index 565cabd2..b484233b 100644 --- a/kiplot/config_reader.py +++ b/kiplot/config_reader.py @@ -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