Fixed flake8 details
This commit is contained in:
parent
69c874fdbd
commit
927ed3c99e
|
|
@ -21,11 +21,11 @@ from kibot.gs import GS
|
|||
from kibot.__main__ import detect_kicad
|
||||
|
||||
|
||||
def ki5_2_ki6(l):
|
||||
l_dot = l.replace('_', '.')
|
||||
def ki5_2_ki6(la):
|
||||
l_dot = la.replace('_', '.')
|
||||
if l_dot in Layer.KICAD6_RENAME:
|
||||
l = Layer.KICAD6_RENAME[l_dot].replace('.', '_')
|
||||
return l
|
||||
la = Layer.KICAD6_RENAME[l_dot].replace('.', '_')
|
||||
return la
|
||||
|
||||
|
||||
GERBER_DIR = 'gerberdir'
|
||||
|
|
@ -53,7 +53,7 @@ ALL_LAYERS = ['B_Adhes',
|
|||
detect_kicad()
|
||||
# New layer names in KiCad 6
|
||||
if GS.ki6():
|
||||
ALL_LAYERS = [ki5_2_ki6(l) for l in ALL_LAYERS]
|
||||
ALL_LAYERS = [ki5_2_ki6(la) for la in ALL_LAYERS]
|
||||
ALL_EXTS = ['gba',
|
||||
'gbr',
|
||||
'gbl',
|
||||
|
|
@ -141,7 +141,7 @@ def check_layers_exist(ctx, dir, prefix, layers, suffix):
|
|||
|
||||
def check_components(ctx, dir, prefix, layers, suffix, exclude, include):
|
||||
if GS.ki6():
|
||||
layers = [ki5_2_ki6(l) for l in layers]
|
||||
layers = [ki5_2_ki6(la) for la in layers]
|
||||
for layer in layers:
|
||||
fname = compose_fname(dir, prefix, layer, suffix)
|
||||
inc = [r'%TO\.C,{}\*%'.format(v) for v in include]
|
||||
|
|
|
|||
Loading…
Reference in New Issue