Cleanup: remove redundant braces from assert & raise
autopep8 v1.7 added a space after assert & raise, remove the braces as they aren't needed.
This commit is contained in:
@@ -229,7 +229,7 @@ def main(context, operator):
|
||||
elif status & STATUS_ERR_NOT_SELECTED:
|
||||
operator.report({'ERROR'}, "Active face not selected")
|
||||
else:
|
||||
assert((status & STATUS_ERR_ACTIVE_FACE) != 0)
|
||||
assert status & STATUS_ERR_ACTIVE_FACE != 0
|
||||
operator.report({'ERROR'}, "No active face")
|
||||
|
||||
|
||||
|
||||
@@ -452,7 +452,7 @@ def lightmap_uvpack(
|
||||
pretty_faces.append(pf_parent)
|
||||
|
||||
w, h = pf_parent.width, pf_parent.height
|
||||
assert(w <= h)
|
||||
assert w <= h
|
||||
|
||||
if w == h:
|
||||
even_dict.setdefault(w, []).append(pf_parent)
|
||||
|
||||
@@ -178,10 +178,10 @@ def context_path_decompose(data_path):
|
||||
prop_item = "".join(path_split[i + 1:])
|
||||
|
||||
if base_path:
|
||||
assert(base_path.startswith("."))
|
||||
assert base_path.startswith(".")
|
||||
base_path = base_path[1:]
|
||||
if prop_attr:
|
||||
assert(prop_attr.startswith("."))
|
||||
assert prop_attr.startswith(".")
|
||||
prop_attr = prop_attr[1:]
|
||||
else:
|
||||
# If there are no properties, everything is an item.
|
||||
@@ -2730,7 +2730,7 @@ class WM_OT_batch_rename(Operator):
|
||||
elif method == 'SUFFIX':
|
||||
name = name + text
|
||||
else:
|
||||
assert(0)
|
||||
assert 0
|
||||
|
||||
elif ty == 'STRIP':
|
||||
chars = action.strip_chars
|
||||
@@ -2775,9 +2775,9 @@ class WM_OT_batch_rename(Operator):
|
||||
elif method == 'TITLE':
|
||||
name = name.title()
|
||||
else:
|
||||
assert(0)
|
||||
assert 0
|
||||
else:
|
||||
assert(0)
|
||||
assert 0
|
||||
return name
|
||||
|
||||
def _data_update(self, context):
|
||||
|
||||
Reference in New Issue
Block a user