Fixed B011 Do not call assert False

This commit is contained in:
Salvador E. Tropea 2022-02-17 16:37:01 -03:00
parent c8d131fe11
commit 15b2075c96
5 changed files with 6 additions and 6 deletions

View File

@ -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()

View File

@ -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.

View File

@ -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():

View File

@ -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):

View File

@ -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