Sort imports with isort

This commit is contained in:
James R. Barlow
2018-12-30 01:28:15 -08:00
parent 06308a22ce
commit 0880b16491
38 changed files with 176 additions and 172 deletions
+7 -5
View File
@@ -15,15 +15,17 @@
# You should have received a copy of the GNU General Public License
# along with OCRmyPDF. If not, see <http://www.gnu.org/licenses/>.
from tempfile import NamedTemporaryFile
from subprocess import run, PIPE, STDOUT
from shutil import copy
from functools import lru_cache
import re
from functools import lru_cache
from os import fspath
from shutil import copy
from subprocess import PIPE, STDOUT, run
from tempfile import NamedTemporaryFile
from PIL import Image
from . import get_version
from ..exceptions import SubprocessOutputError
from os import fspath
@lru_cache(maxsize=1)
+1 -1
View File
@@ -15,8 +15,8 @@
# You should have received a copy of the GNU General Public License
# along with OCRmyPDF. If not, see <http://www.gnu.org/licenses/>.
from subprocess import run, PIPE
from functools import lru_cache
from subprocess import PIPE, run
from . import get_version
from ..exceptions import MissingDependencyError
+1 -1
View File
@@ -15,8 +15,8 @@
# You should have received a copy of the GNU General Public License
# along with OCRmyPDF. If not, see <http://www.gnu.org/licenses/>.
from subprocess import run
from functools import lru_cache
from subprocess import run
from . import get_version
from ..exceptions import MissingDependencyError
+2 -2
View File
@@ -15,11 +15,11 @@
# You should have received a copy of the GNU General Public License
# along with OCRmyPDF. If not, see <http://www.gnu.org/licenses/>.
from subprocess import CalledProcessError, STDOUT, PIPE, run
from functools import lru_cache
from os import fspath
from subprocess import PIPE, STDOUT, CalledProcessError, run
from . import get_version
from os import fspath
@lru_cache(maxsize=1)
+8 -8
View File
@@ -15,26 +15,26 @@
# You should have received a copy of the GNU General Public License
# along with OCRmyPDF. If not, see <http://www.gnu.org/licenses/>.
import sys
import os
import shutil
from functools import lru_cache
import sys
from collections import namedtuple
from textwrap import dedent
from contextlib import suppress
from functools import lru_cache
from os import fspath
from subprocess import (
PIPE,
STDOUT,
CalledProcessError,
TimeoutExpired,
check_output,
STDOUT,
run,
PIPE,
)
from contextlib import suppress
from os import fspath
from textwrap import dedent
from . import get_version
from ..exceptions import MissingDependencyError, TesseractConfigError
from ..helpers import page_number
from . import get_version
OrientationConfidence = namedtuple('OrientationConfidence', ('angle', 'confidence'))
+5 -5
View File
@@ -18,14 +18,14 @@
# unpaper documentation:
# https://github.com/Flameeyes/unpaper/blob/master/doc/basic-concepts.md
from subprocess import CalledProcessError, STDOUT, check_output
from tempfile import NamedTemporaryFile
import sys
import os
import sys
from functools import lru_cache
from ..exceptions import MissingDependencyError
from . import get_version
from subprocess import STDOUT, CalledProcessError, check_output
from tempfile import NamedTemporaryFile
from . import get_version
from ..exceptions import MissingDependencyError
try:
from PIL import Image