Skip to content

Commit

Permalink
fix: sort imports
Browse files Browse the repository at this point in the history
  • Loading branch information
mogoh committed Aug 21, 2023
1 parent e3d9d85 commit eba208c
Show file tree
Hide file tree
Showing 9 changed files with 14 additions and 13 deletions.
3 changes: 1 addition & 2 deletions djangocms_video/cms_plugins.py
Original file line number Diff line number Diff line change
@@ -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

Expand Down
1 change: 0 additions & 1 deletion djangocms_video/forms.py
Original file line number Diff line number Diff line change
Expand Up @@ -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?#]+)')
Expand Down
4 changes: 1 addition & 3 deletions djangocms_video/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 0 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@

from djangocms_video import __version__


REQUIREMENTS = [
'django-cms>=3.7',
'django-filer>=1.7',
Expand Down
1 change: 0 additions & 1 deletion tests/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 1 addition & 2 deletions tests/requirements/compile.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
4 changes: 3 additions & 1 deletion tests/test_forms.py
Original file line number Diff line number Diff line change
@@ -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/{}"
Expand Down
6 changes: 5 additions & 1 deletion tests/test_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 3 additions & 1 deletion tests/test_plugins.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit eba208c

Please sign in to comment.