Przeglądaj źródła

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 lat temu
rodzic
commit
4d0e053c22
No account linked to committer's email address

+ 1
- 2
Makefile Wyświetl plik

83
 lint: ## Run flake8 and isort checks
83
 lint: ## Run flake8 and isort checks
84
 	flake8 src/oscar/
84
 	flake8 src/oscar/
85
 	flake8 tests/
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
 test_migrations: install-migrations-testing-requirements ## Tests migrations
88
 test_migrations: install-migrations-testing-requirements ## Tests migrations
90
 	cd sandbox && ./test_migrations.sh
89
 	cd sandbox && ./test_migrations.sh

+ 1
- 1
requirements.txt Wyświetl plik

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

+ 1
- 0
src/oscar/apps/catalogue/receivers.py Wyświetl plik

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

+ 2
- 2
src/oscar/core/compat.py Wyświetl plik

18
 # Backward-compatible import for url_has_allowed_host_and_scheme.
18
 # Backward-compatible import for url_has_allowed_host_and_scheme.
19
 try:
19
 try:
20
     # Django 3.0 and above
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
 except ImportError:
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
 def get_user_model():
26
 def get_user_model():

+ 1
- 0
src/oscar/core/thumbnails.py Wyświetl plik

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

+ 2
- 1
tests/integration/core/test_autoslugfield.py Wyświetl plik

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

+ 1
- 1
tox.ini Wyświetl plik

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

Ładowanie…
Anuluj
Zapisz