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,19 +1,21 @@
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:
raise ToastException('Could not toast bread')
raise ToastException("Could not toast bread")
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"))