diff --git a/djangocms_video/cms_plugins.py b/djangocms_video/cms_plugins.py index 4663f85..ecc9b2d 100644 --- a/djangocms_video/cms_plugins.py +++ b/djangocms_video/cms_plugins.py @@ -1,7 +1,6 @@ -from django.utils.translation import gettext_lazy as _ - from cms.plugin_base import CMSPluginBase from cms.plugin_pool import plugin_pool +from django.utils.translation import gettext_lazy as _ from . import forms, models diff --git a/djangocms_video/forms.py b/djangocms_video/forms.py index babd361..a66e715 100644 --- a/djangocms_video/forms.py +++ b/djangocms_video/forms.py @@ -5,7 +5,6 @@ from . import models - YOUTUBE_URL_RE = re.compile(r'(?:(?:http://|https://|//)?(?:www\.)?youtu\.?be.*).*') # https://stackoverflow.com/a/9102270 YOUTUBE_VIDEO_ID_RE = re.compile(r'(?:[?&]v=|/embed/|/1/|/v/|https?://(?:www\.)?youtu\.be/)([^&\n?#]+)') diff --git a/djangocms_video/models.py b/djangocms_video/models.py index cda739e..323f0ba 100644 --- a/djangocms_video/models.py +++ b/djangocms_video/models.py @@ -5,14 +5,12 @@ """ from urllib.parse import parse_qsl, urlencode, urlparse, urlunparse +from cms.models import CMSPlugin from django.conf import settings from django.core.exceptions import ValidationError from django.db import models from django.utils.translation import gettext from django.utils.translation import gettext_lazy as _ - -from cms.models import CMSPlugin - from djangocms_attributes_field.fields import AttributesField from filer.fields.file import FilerFileField from filer.fields.image import FilerImageField diff --git a/setup.py b/setup.py index 2e4a582..e211d7f 100644 --- a/setup.py +++ b/setup.py @@ -3,7 +3,6 @@ from djangocms_video import __version__ - REQUIREMENTS = [ 'django-cms>=3.7', 'django-filer>=1.7', diff --git a/tests/helpers.py b/tests/helpers.py index af7cbc3..57b2a45 100644 --- a/tests/helpers.py +++ b/tests/helpers.py @@ -2,7 +2,6 @@ from tempfile import mkdtemp from django.core.files import File - from filer.models.filemodels import File as FilerFile from filer.models.foldermodels import Folder as FilerFolder from filer.models.imagemodels import Image as FilerImage diff --git a/tests/requirements/compile.py b/tests/requirements/compile.py index 6775f7f..f4a7064 100755 --- a/tests/requirements/compile.py +++ b/tests/requirements/compile.py @@ -28,8 +28,7 @@ from __future__ import annotations import sys -from os import chdir -from os import environ +from os import chdir, environ from pathlib import Path from subprocess import run diff --git a/tests/test_forms.py b/tests/test_forms.py index 0dcc0ec..bc76b1b 100644 --- a/tests/test_forms.py +++ b/tests/test_forms.py @@ -1,7 +1,9 @@ from django.test import TestCase, override_settings from djangocms_video.forms import ( - DEFAULT_YOUTUBE_EMBED_URL, YOUTUBE_URL_RE, VideoPlayerPluginForm, + DEFAULT_YOUTUBE_EMBED_URL, + YOUTUBE_URL_RE, + VideoPlayerPluginForm, ) YOUTUBE_NOCOOKIE_EMBED_URL = "//www.youtube-nocookie.com/embed/{}" diff --git a/tests/test_models.py b/tests/test_models.py index 1ce25ad..383a7d0 100644 --- a/tests/test_models.py +++ b/tests/test_models.py @@ -3,7 +3,11 @@ from django.test import TestCase from djangocms_video.models import ( - VideoPlayer, VideoSource, VideoTrack, get_extensions, get_templates, + VideoPlayer, + VideoSource, + VideoTrack, + get_extensions, + get_templates, ) from .helpers import get_filer_file, get_filer_image diff --git a/tests/test_plugins.py b/tests/test_plugins.py index ce194eb..53a471a 100644 --- a/tests/test_plugins.py +++ b/tests/test_plugins.py @@ -2,7 +2,9 @@ from cms.test_utils.testcases import CMSTestCase from djangocms_video.cms_plugins import ( - VideoPlayerPlugin, VideoSourcePlugin, VideoTrackPlugin, + VideoPlayerPlugin, + VideoSourcePlugin, + VideoTrackPlugin, ) from .helpers import get_filer_file