Run pre-commit on all files

This commit is contained in:
Charles-Axel Dein
2020-07-21 09:37:15 +02:00
parent 4af5a19d79
commit ec0f449ede
22 changed files with 125 additions and 36 deletions

View File

@ -1,20 +1,22 @@
from collections import namedtuple
Bread = namedtuple('Bread', 'color')
Bread = namedtuple("Bread", "color")
class ToastException(Exception):
pass
def toast(bread):
try:
put_in_toaster(bread)
except:
print 'Got exception while trying to toast'
print("Got exception while trying to toast")
raise
def put_in_toaster(bread):
brad.color = 'light_brown' # Note the typo
brad.color = "light_brown" # Note the typo
toast(Bread('yellow'))
toast(Bread("yellow"))