Sourcery rule id:
Move a guard clause in a while statement's body into its test
location = "Work" destination = "Home" while True: if location == destination: break location = travel()
location = "Work" destination = "Home" while not location == destination: location = travel()
Removing the guard clause simplifies the code and makes clearer the intention of the loop.