Skip to content
Permalink
Browse files

Run isort

  • Loading branch information
saimn committed Mar 16, 2020
1 parent 97b6808 commit e533b32dfc4838c1c1588a69d18b86f167c72272
@@ -35,6 +35,7 @@

import os
import re

from git import Repo
from github import Github

@@ -1,9 +1,10 @@
import os
import sys

import alabaster
from pkg_resources import get_distribution

import alabaster

# If extensions (or modules to document with autodoc) are in another directory,
# add these directories to sys.path here. If the directory is relative to the
# documentation root, use os.path.abspath to make it absolute, like shown here.
@@ -1,4 +1,5 @@
import sys

from setuptools import setup

if sys.version_info[:2] < (3, 6):
@@ -18,18 +18,18 @@
# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
# IN THE SOFTWARE.

import click
import importlib
import locale
import logging
import os
import socketserver
import sys
import time
from http import server

import click
from click import argument, option
from http import server
from pkg_resources import get_distribution, DistributionNotFound
from pkg_resources import DistributionNotFound, get_distribution

from .gallery import Gallery
from .log import init_logging
@@ -31,23 +31,23 @@
import pickle
import random
import sys

from click import progressbar, get_terminal_size
from collections import defaultdict
from datetime import datetime
from itertools import cycle
from os.path import isfile, join, splitext
from urllib.parse import quote as url_quote

from . import image, video, signals
from .image import (process_image, get_exif_tags, get_exif_data, get_size,
get_iptc_data)
from click import get_terminal_size, progressbar

from . import image, signals, video
from .image import (get_exif_data, get_exif_tags, get_iptc_data, get_size,
process_image)
from .settings import get_thumb
from .utils import (Devnull, copy, check_or_create_dir, url_from_path,
read_markdown, cached_property, is_valid_html5_video,
get_mime)
from .utils import (Devnull, cached_property, check_or_create_dir, copy,
get_mime, is_valid_html5_video, read_markdown,
url_from_path)
from .video import process_video
from .writer import AlbumPageWriter, AlbumListPageWriter
from .writer import AlbumListPageWriter, AlbumPageWriter


class Media:
@@ -29,22 +29,23 @@
#
# and partially modified. The code in question is licensed under MIT license.

import fractions
import logging
import os
import pilkit.processors
import sys
import warnings
import fractions

from copy import deepcopy
from datetime import datetime
from PIL.ExifTags import TAGS, GPSTAGS
from PIL import Image as PILImage, ImageOps, ImageFile, IptcImagePlugin

import pilkit.processors
from PIL import Image as PILImage
from PIL import ImageFile, ImageOps, IptcImagePlugin
from PIL.ExifTags import GPSTAGS, TAGS
from pilkit.processors import Transpose
from pilkit.utils import save_image

from . import signals, utils
from .settings import get_thumb, Status
from .settings import Status, get_thumb

# Force loading of truncated files
ImageFile.LOAD_TRUNCATED_IMAGES = True
@@ -21,7 +21,6 @@
import logging
import os
import sys

from logging import Formatter

# The background is set with 40 plus the number of the color, and the
@@ -14,9 +14,11 @@
"""

import logging
from sigal import signals

from pilkit.processors import Adjust

from sigal import signals

logger = logging.getLogger(__name__)


@@ -27,14 +27,15 @@
"""

import logging
import gzip
import shutil
import logging
import os
import shutil

from sigal import signals
from click import progressbar

from sigal import signals

logger = logging.getLogger(__name__)

DEFAULT_SETTINGS = {
@@ -16,8 +16,9 @@
"""

import logging
from PIL import ImageDraw
from PIL import ImageFont

from PIL import ImageDraw, ImageFont

from sigal import signals

logger = logging.getLogger(__name__)
@@ -29,9 +29,10 @@
"""

import pickle
import logging
import os
import pickle

from sigal import signals

logger = logging.getLogger(__name__)
@@ -18,10 +18,11 @@

import logging
import os

from datetime import datetime

from feedgenerator import Atom1Feed, Rss201rev2Feed
from jinja2 import Markup

from sigal import signals

logger = logging.getLogger(__name__)
@@ -32,8 +32,8 @@
import os

from sigal import signals
from sigal.writer import AbstractWriter
from sigal.utils import url_from_path
from sigal.writer import AbstractWriter


class PageWriter(AbstractWriter):
@@ -48,6 +48,7 @@

import logging
import os

from sigal import signals

logger = logging.getLogger(__name__)
@@ -22,10 +22,10 @@
"""

import boto
import logging
import os

import boto
from boto.s3.key import Key
from click import progressbar

@@ -35,7 +35,9 @@
"""

import logging

from PIL import Image, ImageEnhance

from sigal import signals


@@ -31,11 +31,12 @@

import logging
import os
import zipfile
from os.path import isfile, join, splitext

from sigal import signals
from sigal.gallery import Album
from sigal.utils import cached_property
import zipfile

logger = logging.getLogger(__name__)

@@ -25,7 +25,6 @@
from os.path import abspath, isabs, join, normpath
from pprint import pformat


_DEFAULT_CONFIG = {
'albums_sort_attr': 'name',
'albums_sort_reverse': False,
@@ -20,11 +20,11 @@

import os
import shutil
from urllib.parse import quote

from markdown import Markdown
from markupsafe import Markup

from urllib.parse import quote

VIDEO_MIMES = {'.mp4': 'video/mp4',
'.webm': 'video/webm',
'.ogv': 'video/ogg'}
@@ -27,7 +27,7 @@
from os.path import splitext

from . import image, utils
from .settings import get_thumb, Status
from .settings import Status, get_thumb
from .utils import is_valid_html5_video


@@ -20,15 +20,15 @@
# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
# IN THE SOFTWARE.

import jinja2
import logging
import imp
import logging
import os
import sys
import types

from distutils.dir_util import copy_tree
from jinja2 import Environment, FileSystemLoader, ChoiceLoader, PrefixLoader

import jinja2
from jinja2 import ChoiceLoader, Environment, FileSystemLoader, PrefixLoader
from jinja2.exceptions import TemplateNotFound

from .utils import url_from_path
@@ -1,8 +1,9 @@
import blinker
import os
import shutil

import blinker
import PIL
import pytest
import shutil

from sigal import signals
from sigal.settings import read_settings
@@ -1,9 +1,10 @@
import logging
import os
from click.testing import CliRunner
from os.path import join

from sigal import init, build, serve, set_meta
from click.testing import CliRunner

from sigal import build, init, serve, set_meta

TESTGAL = join(os.path.abspath(os.path.dirname(__file__)), 'sample')

@@ -1,6 +1,5 @@
import os
import sys

from unittest import mock

import pytest
@@ -1,5 +1,6 @@
import os
import pickle

import pytest

from sigal.gallery import Gallery
@@ -1,11 +1,12 @@
import datetime
import logging
import os
import pytest
import datetime

from os.path import join
from urllib.parse import quote
from sigal.gallery import Album, Media, Image, Video, Gallery

import pytest

from sigal.gallery import Album, Gallery, Image, Media, Video
from sigal.video import SubprocessException

CURRENT_DIR = os.path.dirname(__file__)
@@ -1,12 +1,13 @@
import os
import pytest
from unittest.mock import patch

import pytest
from PIL import Image

from sigal import init_logging
from sigal.image import (generate_image, generate_thumbnail, get_exif_tags,
get_exif_data, get_size, process_image, get_iptc_data)
from sigal.settings import create_settings, Status
from sigal.image import (generate_image, generate_thumbnail, get_exif_data,
get_exif_tags, get_iptc_data, get_size, process_image)
from sigal.settings import Status, create_settings

CURRENT_DIR = os.path.dirname(__file__)
TEST_IMAGE = 'KeckObservatory20071020.jpg'
@@ -1,7 +1,7 @@
import os

from sigal.gallery import Gallery
from sigal import init_plugins
from sigal.gallery import Gallery

CURRENT_DIR = os.path.dirname(__file__)

@@ -1,6 +1,6 @@
import os

from sigal.settings import read_settings, get_thumb
from sigal.settings import get_thumb, read_settings

CURRENT_DIR = os.path.abspath(os.path.dirname(__file__))

@@ -1,5 +1,6 @@
import os
from pathlib import Path

from sigal import utils

CURRENT_DIR = os.path.dirname(__file__)

0 comments on commit e533b32

Please sign in to comment.
You can’t perform that action at this time.