diff --git a/.pylintrc b/.pylintrc index 7b3eea25625171d7c0e7d67de3ae6a3f2db83cf2..09b688ca5ca2d49df263bfbd2d19c00bafd5ef60 100644 --- a/.pylintrc +++ b/.pylintrc @@ -10,4 +10,5 @@ disable=line-too-long, arguments-differ, invalid-name, no-else-raise, + arguments-renamed, diff --git a/unisportomat/quiz/management/commands/seed_db.py b/unisportomat/quiz/management/commands/seed_db.py index c1d32d105a7259013226305b519da8a6adb65096..36270c940a091efad080543a29b7441dea5d802b 100644 --- a/unisportomat/quiz/management/commands/seed_db.py +++ b/unisportomat/quiz/management/commands/seed_db.py @@ -133,11 +133,12 @@ class Command(BaseCommand): ), ("Mache vor der nächsten Frage 3 Jumping Jacks", "Do Three Jumping Jacks."), ] - image = SimpleUploadedFile( - name="test_image.png", - content=open("quiz/fixtures/images/test_image.png", "rb").read(), - content_type="image/png", - ) + with open("quiz/fixtures/images/test_image.png", "rb") as read_file: + image = SimpleUploadedFile( + name="test_image.png", + content=read_file.read(), + content_type="image/png", + ) for text in calls_to_move: activate("de") @@ -161,11 +162,13 @@ class Command(BaseCommand): "That proper training prevents heart disease?", ), ] - image = SimpleUploadedFile( - name="logo.png", - content=open("quiz/fixtures/images/logo.png", "rb").read(), - content_type="image/png", - ) + + with open("quiz/fixtures/images/logo.png", "rb") as read_file: + image = SimpleUploadedFile( + name="logo.png", + content=read_file.read(), + content_type="image/png", + ) for text in knowledge_snacks: activate("de") k_s = KnowledgeSnack(text=text[0], image=image)