Cleanup: add "unreachable" message to "assert False" statements

Clarify that these blocks are unreachable so the intention is clear
if they're ever encountered.
This commit is contained in:
Campbell Barton
2024-03-15 13:18:29 +11:00
parent 2e6a8ae49c
commit f347706ecd
6 changed files with 14 additions and 18 deletions
+3 -3
View File
@@ -2959,7 +2959,7 @@ class WM_OT_batch_rename(Operator):
elif method == 'SUFFIX':
name = name + text
else:
assert 0
assert False, "unreachable"
elif ty == 'STRIP':
chars = action.strip_chars
@@ -3004,9 +3004,9 @@ class WM_OT_batch_rename(Operator):
elif method == 'TITLE':
name = name.title()
else:
assert 0
assert False, "unreachable"
else:
assert 0
assert False, "unreachable"
return name
def _data_update(self, context):