瀏覽代碼

Merge pull request #3452 from django-oscar/dependabot/pip/isort-5.1.1

Bump isort from 4.3.21 to 5.1.1
master
Samir Shah 4 年之前
父節點
當前提交
4d0e053c22
沒有連結到貢獻者的電子郵件帳戶。

+ 1
- 2
Makefile 查看文件

@@ -83,8 +83,7 @@ coverage: venv ## Generate coverage report
83 83
 lint: ## Run flake8 and isort checks
84 84
 	flake8 src/oscar/
85 85
 	flake8 tests/
86
-	isort -c -q --recursive --diff src/
87
-	isort -c -q --recursive --diff tests/
86
+	isort -c -q --diff src/ tests/
88 87
 
89 88
 test_migrations: install-migrations-testing-requirements ## Tests migrations
90 89
 	cd sandbox && ./test_migrations.sh

+ 1
- 1
requirements.txt 查看文件

@@ -21,7 +21,7 @@ whitenoise==5.1.0
21 21
 flake8==3.8.3
22 22
 flake8-debugger==3.2.1
23 23
 flake8-blind-except==0.1.1
24
-isort==4.3.21
24
+isort==5.1.1
25 25
 
26 26
 # Helpers
27 27
 pyprof2calltree==1.4.5

+ 1
- 0
src/oscar/apps/catalogue/receivers.py 查看文件

@@ -10,6 +10,7 @@ Category = get_model("catalogue", "Category")
10 10
 
11 11
 if settings.OSCAR_DELETE_IMAGE_FILES:
12 12
     from django.db import models
13
+
13 14
     from oscar.core.thumbnails import get_thumbnailer
14 15
 
15 16
     ProductImage = get_model('catalogue', 'ProductImage')

+ 2
- 2
src/oscar/core/compat.py 查看文件

@@ -18,9 +18,9 @@ except ValueError:
18 18
 # Backward-compatible import for url_has_allowed_host_and_scheme.
19 19
 try:
20 20
     # Django 3.0 and above
21
-    from django.utils.http import url_has_allowed_host_and_scheme       # noqa F401
21
+    from django.utils.http import url_has_allowed_host_and_scheme  # noqa F401
22 22
 except ImportError:
23
-    from django.utils.http import is_safe_url as url_has_allowed_host_and_scheme    # noqa F401
23
+    from django.utils.http import is_safe_url as url_has_allowed_host_and_scheme  # noqa F401 isort:skip
24 24
 
25 25
 
26 26
 def get_user_model():

+ 1
- 0
src/oscar/core/thumbnails.py 查看文件

@@ -19,6 +19,7 @@ class SorlThumbnail(AbstractThumbnailer):
19 19
 
20 20
     def generate_thumbnail(self, source, **opts):
21 21
         from sorl.thumbnail import get_thumbnail
22
+
22 23
         # Sorl can accept only: "width x height", "width", "x height".
23 24
         # https://sorl-thumbnail.readthedocs.io/en/latest/template.html#geometry
24 25
         # So for example value '50x' must be converted to '50'.

+ 2
- 1
tests/integration/core/test_autoslugfield.py 查看文件

@@ -171,9 +171,10 @@ class AutoSlugFieldTest(TestCase):
171 171
         Tests making migrations with Django 1.7+'s migration framework
172 172
         """
173 173
 
174
-        import oscar
175 174
         from django.db import migrations
176 175
         from django.db.migrations.writer import MigrationWriter
176
+
177
+        import oscar
177 178
         from oscar.models.fields import AutoSlugField
178 179
         fields = {
179 180
             'autoslugfield': AutoSlugField(populate_from='otherfield'),

+ 1
- 1
tox.ini 查看文件

@@ -22,7 +22,7 @@ deps =
22 22
 commands =
23 23
     npm ci
24 24
     flake8 src tests setup.py
25
-    isort -c -q --recursive --diff src/ tests/
25
+    isort -c -q --diff src/ tests/
26 26
     npm run eslint
27 27
     django-admin.py compilemessages
28 28
 

Loading…
取消
儲存