From f7b8e015a4ba6f626bdbc55440ca0d3afa57df1d Mon Sep 17 00:00:00 2001 From: Samar Hassan Date: Thu, 18 Jan 2024 23:47:07 +0000 Subject: [PATCH] fix :wrench: resolve lint errors --- .gitignore | 3 ++- oscarapi/tests/unit/testproduct.py | 9 ++++++--- oscarapi/utils/exists.py | 1 + 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/.gitignore b/.gitignore index e904498a..a567e1a7 100644 --- a/.gitignore +++ b/.gitignore @@ -17,4 +17,5 @@ version-django-oscar-commerce-connect.txt sandbox/media/ sandbox/static/ docs/build/ -lint.installed \ No newline at end of file +lint.installed +.vscode diff --git a/oscarapi/tests/unit/testproduct.py b/oscarapi/tests/unit/testproduct.py index 8abedbf6..0767cba9 100644 --- a/oscarapi/tests/unit/testproduct.py +++ b/oscarapi/tests/unit/testproduct.py @@ -1173,8 +1173,9 @@ def test_add_local_image(self): "description": "Henk", "images": [ { - "original": "https://testserver/%s/image.jpg" - % settings.MEDIA_ROOT, + "original": ( + "https://testserver/%s/image.jpg" % settings.MEDIA_ROOT + ), "caption": "HA! IK HEET HARRIE", } ], @@ -1210,7 +1211,9 @@ def test_add_broken_image(self, urlopen): "description": "Henk", "images": [ { - "original": "https://example.com/image-that-does-not-exist-at-all.png", + "original": ( + "https://example.com/image-that-does-not-exist-at-all.png" + ), "caption": "HA! IK HEET HARRIE", } ], diff --git a/oscarapi/utils/exists.py b/oscarapi/utils/exists.py index c82d88fa..b81c7d31 100644 --- a/oscarapi/utils/exists.py +++ b/oscarapi/utils/exists.py @@ -2,6 +2,7 @@ This module contains functions that can be used to identify an existing piece of data in the database based on it's unique attributes """ + from django.db import models from oscar.core.loading import get_model