Fixed B011 Do not call assert False
This commit is contained in:
parent
c8d131fe11
commit
15b2075c96
|
|
@ -267,9 +267,9 @@ class GS(object):
|
|||
@staticmethod
|
||||
def load_board():
|
||||
""" Will be repplaced by kiplot.py """
|
||||
assert False
|
||||
raise AssertionError()
|
||||
|
||||
@staticmethod
|
||||
def load_sch():
|
||||
""" Will be repplaced by kiplot.py """
|
||||
assert False
|
||||
raise AssertionError()
|
||||
|
|
|
|||
|
|
@ -109,7 +109,7 @@ class KiConf(object):
|
|||
lib_aliases = {}
|
||||
|
||||
def __init__(self):
|
||||
assert False, "KiConf is fully static, no instances allowed"
|
||||
raise AssertionError("KiConf is fully static, no instances allowed")
|
||||
|
||||
def init(fname):
|
||||
""" fname is the base project name, any extension is allowed.
|
||||
|
|
|
|||
|
|
@ -197,7 +197,7 @@ class Layer(Optionable):
|
|||
raise KiPlotConfigurationError("Unknown layer spec: `{}`".format(layer))
|
||||
new_vals.extend(ext)
|
||||
return new_vals
|
||||
assert False, "Unimplemented layer type "+str(type(values))
|
||||
raise AssertionError("Unimplemented layer type "+str(type(values)))
|
||||
|
||||
@staticmethod
|
||||
def _get_copper():
|
||||
|
|
|
|||
|
|
@ -1256,7 +1256,7 @@ def check_value(rows, r_col, ref, v_col, val):
|
|||
assert r[v_col] == val
|
||||
logging.debug(ref+'='+val+' OK')
|
||||
return
|
||||
assert False, "Failed to find "+ref
|
||||
raise AssertionError("Failed to find "+ref)
|
||||
|
||||
|
||||
def test_int_bom_variant_t2b(test_dir):
|
||||
|
|
|
|||
|
|
@ -78,7 +78,7 @@ def check_l1(ctx):
|
|||
except SchFileError as e:
|
||||
logging.error('At line {} of `{}`: {}'.format(e.line, e.file, e.msg))
|
||||
logging.error('Line content: `{}`'.format(e.code))
|
||||
assert False
|
||||
raise AssertionError()
|
||||
comps = sch.get_components()
|
||||
l1 = next(c for c in comps if c.ref == 'L1')
|
||||
assert l1
|
||||
|
|
|
|||
Loading…
Reference in New Issue