Remove Assert True¶
Sourcery refactoring id:
assert True statements
print("Checking things") assert True assert True, "Always true" assert len([0, 1, 2]) >= 0, "This is also always true" print("Done")
print("Checking things") print("Done")
Assertions are useful to make sure that some conditions hold during the execution of a program. However, when the expression being evaluated is always true, no assertion is necessary, and removing it makes code simpler and easier to understand.