mirror of
https://github.com/python-pillow/Pillow.git
synced 2024-12-27 10:26:19 +03:00
flake8: E402 module level import not at top of file
This commit is contained in:
parent
8a6f2b9de8
commit
0b7910c7cd
|
@ -17,6 +17,10 @@
|
||||||
# documentation root, use os.path.abspath to make it absolute, like shown here.
|
# documentation root, use os.path.abspath to make it absolute, like shown here.
|
||||||
#sys.path.insert(0, os.path.abspath('.'))
|
#sys.path.insert(0, os.path.abspath('.'))
|
||||||
|
|
||||||
|
import sphinx_rtd_theme
|
||||||
|
|
||||||
|
import PIL
|
||||||
|
|
||||||
# -- General configuration ------------------------------------------------
|
# -- General configuration ------------------------------------------------
|
||||||
|
|
||||||
# If your documentation needs a minimal Sphinx version, state it here.
|
# If your documentation needs a minimal Sphinx version, state it here.
|
||||||
|
@ -52,7 +56,6 @@ author = u'Fredrik Lundh, Alex Clark and Contributors'
|
||||||
# built documents.
|
# built documents.
|
||||||
#
|
#
|
||||||
# The short X.Y version.
|
# The short X.Y version.
|
||||||
import PIL
|
|
||||||
version = PIL.__version__
|
version = PIL.__version__
|
||||||
# The full version, including alpha/beta/rc tags.
|
# The full version, including alpha/beta/rc tags.
|
||||||
release = PIL.__version__
|
release = PIL.__version__
|
||||||
|
@ -107,7 +110,6 @@ todo_include_todos = False
|
||||||
# The theme to use for HTML and HTML Help pages. See the documentation for
|
# The theme to use for HTML and HTML Help pages. See the documentation for
|
||||||
# a list of builtin themes.
|
# a list of builtin themes.
|
||||||
|
|
||||||
import sphinx_rtd_theme
|
|
||||||
html_theme = "sphinx_rtd_theme"
|
html_theme = "sphinx_rtd_theme"
|
||||||
html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]
|
html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]
|
||||||
|
|
||||||
|
|
|
@ -28,14 +28,41 @@
|
||||||
# PILLOW_VERSION is deprecated and will be removed after that.
|
# PILLOW_VERSION is deprecated and will be removed after that.
|
||||||
# Use __version__ instead.
|
# Use __version__ instead.
|
||||||
from . import VERSION, PILLOW_VERSION, __version__, _plugins
|
from . import VERSION, PILLOW_VERSION, __version__, _plugins
|
||||||
assert VERSION
|
|
||||||
assert PILLOW_VERSION
|
|
||||||
from ._util import py3
|
from ._util import py3
|
||||||
|
|
||||||
import logging
|
import logging
|
||||||
import warnings
|
import warnings
|
||||||
import math
|
import math
|
||||||
|
|
||||||
|
try:
|
||||||
|
import builtins
|
||||||
|
except ImportError:
|
||||||
|
import __builtin__
|
||||||
|
builtins = __builtin__
|
||||||
|
|
||||||
|
from . import ImageMode
|
||||||
|
from ._binary import i8
|
||||||
|
from ._util import isPath, isStringType, deferred_error
|
||||||
|
|
||||||
|
import os
|
||||||
|
import sys
|
||||||
|
import io
|
||||||
|
import struct
|
||||||
|
import atexit
|
||||||
|
|
||||||
|
# type stuff
|
||||||
|
import numbers
|
||||||
|
try:
|
||||||
|
# Python 3
|
||||||
|
from collections.abc import Callable
|
||||||
|
except ImportError:
|
||||||
|
# Python 2.7
|
||||||
|
from collections import Callable
|
||||||
|
|
||||||
|
|
||||||
|
# Silence warnings
|
||||||
|
assert VERSION
|
||||||
|
assert PILLOW_VERSION
|
||||||
|
|
||||||
logger = logging.getLogger(__name__)
|
logger = logging.getLogger(__name__)
|
||||||
|
|
||||||
|
@ -107,31 +134,6 @@ except ImportError as v:
|
||||||
# see docs/porting.rst
|
# see docs/porting.rst
|
||||||
raise
|
raise
|
||||||
|
|
||||||
try:
|
|
||||||
import builtins
|
|
||||||
except ImportError:
|
|
||||||
import __builtin__
|
|
||||||
builtins = __builtin__
|
|
||||||
|
|
||||||
from . import ImageMode
|
|
||||||
from ._binary import i8
|
|
||||||
from ._util import isPath, isStringType, deferred_error
|
|
||||||
|
|
||||||
import os
|
|
||||||
import sys
|
|
||||||
import io
|
|
||||||
import struct
|
|
||||||
import atexit
|
|
||||||
|
|
||||||
# type stuff
|
|
||||||
import numbers
|
|
||||||
try:
|
|
||||||
# Python 3
|
|
||||||
from collections.abc import Callable
|
|
||||||
except ImportError:
|
|
||||||
# Python 2.7
|
|
||||||
from collections import Callable
|
|
||||||
|
|
||||||
|
|
||||||
# works everywhere, win for pypy, not cpython
|
# works everywhere, win for pypy, not cpython
|
||||||
USE_CFFI_ACCESS = hasattr(sys, 'pypy_version_info')
|
USE_CFFI_ACCESS = hasattr(sys, 'pypy_version_info')
|
||||||
|
|
|
@ -26,15 +26,15 @@
|
||||||
#
|
#
|
||||||
|
|
||||||
import sys
|
import sys
|
||||||
|
from io import BytesIO
|
||||||
|
|
||||||
|
from . import Image
|
||||||
|
|
||||||
if sys.version_info.major > 2:
|
if sys.version_info.major > 2:
|
||||||
import tkinter
|
import tkinter
|
||||||
else:
|
else:
|
||||||
import Tkinter as tkinter
|
import Tkinter as tkinter
|
||||||
|
|
||||||
from . import Image
|
|
||||||
from io import BytesIO
|
|
||||||
|
|
||||||
|
|
||||||
# --------------------------------------------------------------------
|
# --------------------------------------------------------------------
|
||||||
# Check for Tkinter interface hooks
|
# Check for Tkinter interface hooks
|
||||||
|
|
Loading…
Reference in New Issue
Block a user