Skip to content

Commit b9e6997

Browse files
authored
Update black and isort for embed_video and example_project (#227)
* Update `black` and `isort` for `embed_video` * Run `black` on `example_project` too * Also run `isort` on `example_project` Also includes necessary changes to get to pass.
1 parent 847d077 commit b9e6997

File tree

8 files changed

+14
-14
lines changed

8 files changed

+14
-14
lines changed

embed_video/tests/backends/tests_soundcloud.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -111,9 +111,9 @@ def get_info(self):
111111
"width": 123,
112112
"height": 321,
113113
"thumbnail_url": "xyz",
114-
"html": '\u003Ciframe width="100%" height="400" '
114+
"html": '\u003ciframe width="100%" height="400" '
115115
'scrolling="no" frameborder="no" '
116-
'src="{0}"\u003E\u003C/iframe\u003E'.format(self.url),
116+
'src="{0}"\u003e\u003c/iframe\u003e'.format(self.url),
117117
}
118118

119119
self.foo = FooBackend("abcd")

embed_video/tests/templatetags/tests_embed_video_tags.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -134,12 +134,10 @@ def test_user_size(self):
134134
)
135135

136136
def test_wrong_size(self):
137-
template = Template(
138-
"""
137+
template = Template("""
139138
{% load embed_video_tags %}
140139
{% video 'http://www.youtube.com/watch?v=jsrRJyHBvzw' 'so x huge' %}
141-
"""
142-
)
140+
""")
143141
request = RequestContext(HttpRequest())
144142
self.assertRaises(TemplateSyntaxError, template.render, request)
145143

example_project/example_project/settings.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343
"django.middleware.clickjacking.XFrameOptionsMiddleware",
4444
]
4545

46-
DEFAULT_AUTO_FIELD = 'django.db.models.BigAutoField'
46+
DEFAULT_AUTO_FIELD = "django.db.models.BigAutoField"
4747

4848
APPEND_SLASH = True
4949

example_project/example_project/urls.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
1+
from django.contrib import admin
12
from django.contrib.staticfiles.urls import staticfiles_urlpatterns
23
from django.urls import include, path
34

4-
from django.contrib import admin
5-
65
admin.autodiscover()
76

87
urlpatterns = staticfiles_urlpatterns() + [

example_project/example_project/wsgi.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
framework.
1414
1515
"""
16+
1617
import os
1718

1819
# We defer to a DJANGO_SETTINGS_MODULE already in the environment. This breaks

example_project/posts/urls.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
from django.urls import include, re_path
22

3-
from .views import PostListView, PostDetailView
3+
from .views import PostDetailView, PostListView
44

55
urlpatterns = [
66
re_path(r"(?P<pk>\d+)/$", PostDetailView.as_view(), name="detail"),

example_project/posts/views.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from django.views.generic import ListView, DetailView
1+
from django.views.generic import DetailView, ListView
22

33
from .models import Post
44

tox.ini

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,9 +53,11 @@ ignore_errors =
5353
ignore_errors = true
5454
basepython = 3.11
5555
deps =
56-
black==22.6.0
57-
isort==5.6.4
56+
black~=26.1
57+
isort~=7.0
5858
skip_install = true
5959
commands =
6060
isort --profile black --check-only --diff embed_video setup.py
61-
black -t py38 --check --diff embed_video
61+
black --check --diff embed_video
62+
isort --profile black --check-only --diff --extend-skip-glob='**/migrations' example_project
63+
black --check --diff --extend-exclude '/migrations' example_project

0 commit comments

Comments
 (0)