pre-commit run reorder-python-imports --all-files

This commit is contained in:
Anthony Sottile 2019-06-02 15:31:29 -07:00 committed by Bruno Oliveira
parent 5034399d7a
commit 3f1ec520fc
80 changed files with 3 additions and 312 deletions

View File

@ -1,5 +1,3 @@
from six.moves import range
import pytest import pytest
SKIP = True SKIP = True

View File

@ -53,10 +53,6 @@ If things do not work right away:
which should throw a KeyError: 'COMPLINE' (which is properly set by the which should throw a KeyError: 'COMPLINE' (which is properly set by the
global argcomplete script). global argcomplete script).
""" """
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import os import os
import sys import sys
from glob import glob from glob import glob

View File

@ -1,8 +1,4 @@
""" python inspection/code generation API """ """ python inspection/code generation API """
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from .code import Code # noqa from .code import Code # noqa
from .code import ExceptionInfo # noqa from .code import ExceptionInfo # noqa
from .code import filter_traceback # noqa from .code import filter_traceback # noqa

View File

@ -2,11 +2,6 @@
# CHANGES: # CHANGES:
# - some_str is replaced, trying to create unicode strings # - some_str is replaced, trying to create unicode strings
# #
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals
import types import types
from six import text_type from six import text_type

View File

@ -1,7 +1,3 @@
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import inspect import inspect
import re import re
import sys import sys

View File

@ -1,7 +1,3 @@
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import ast import ast
import inspect import inspect
import linecache import linecache

View File

@ -1,6 +1,5 @@
import pprint import pprint
import reprlib
from six.moves import reprlib
def _call_and_format_exception(call, x, *args): def _call_and_format_exception(call, x, *args):

View File

@ -1,10 +1,6 @@
""" """
support for presenting detailed information in failing assertions. support for presenting detailed information in failing assertions.
""" """
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import sys import sys
import six import six

View File

@ -1,8 +1,4 @@
"""Rewrite assertion AST to produce nice error messages""" """Rewrite assertion AST to produce nice error messages"""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import ast import ast
import errno import errno
import imp import imp

View File

@ -4,10 +4,6 @@ Utilities for truncating assertion output.
Current default behaviour is to truncate assertion explanations at Current default behaviour is to truncate assertion explanations at
~8 terminal lines, unless running in "-vv" mode or running on CI. ~8 terminal lines, unless running in "-vv" mode or running on CI.
""" """
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import os import os
import six import six

View File

@ -1,8 +1,4 @@
"""Utilities for assertion debugging""" """Utilities for assertion debugging"""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import pprint import pprint
from collections.abc import Sequence from collections.abc import Sequence

View File

@ -4,10 +4,6 @@ merged implementation of the cache provider
the name cache was not chosen to ensure pluggy automatically the name cache was not chosen to ensure pluggy automatically
ignores the external pytest-cache ignores the external pytest-cache
""" """
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import json import json
import os import os
from collections import OrderedDict from collections import OrderedDict

View File

@ -2,10 +2,6 @@
per-test stdout/stderr capturing mechanism. per-test stdout/stderr capturing mechanism.
""" """
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import collections import collections
import contextlib import contextlib
import io import io

View File

@ -1,10 +1,6 @@
""" """
python version compatibility code python version compatibility code
""" """
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import functools import functools
import inspect import inspect
import io import io

View File

@ -1,8 +1,4 @@
""" command line options, ini-file and conftest.py processing. """ """ command line options, ini-file and conftest.py processing. """
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import argparse import argparse
import copy import copy
import inspect import inspect

View File

@ -1,8 +1,4 @@
""" interactive debugging with PDB, the Python Debugger. """ """ interactive debugging with PDB, the Python Debugger. """
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import argparse import argparse
import pdb import pdb
import sys import sys

View File

@ -8,10 +8,6 @@ be removed when the time comes.
All constants defined in this module should be either PytestWarning instances or UnformattedWarning All constants defined in this module should be either PytestWarning instances or UnformattedWarning
in case of warnings which need to format their messages. in case of warnings which need to format their messages.
""" """
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from _pytest.warning_types import PytestDeprecationWarning from _pytest.warning_types import PytestDeprecationWarning
from _pytest.warning_types import RemovedInPytest4Warning from _pytest.warning_types import RemovedInPytest4Warning
from _pytest.warning_types import UnformattedWarning from _pytest.warning_types import UnformattedWarning

View File

@ -1,8 +1,4 @@
""" discover and run doctests in modules and test files.""" """ discover and run doctests in modules and test files."""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import inspect import inspect
import platform import platform
import sys import sys

View File

@ -1,7 +1,3 @@
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import functools import functools
import inspect import inspect
import itertools import itertools

View File

@ -2,9 +2,6 @@
Provides a function to report all internal modules for using freezing tools Provides a function to report all internal modules for using freezing tools
pytest pytest
""" """
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
def freeze_includes(): def freeze_includes():

View File

@ -1,8 +1,4 @@
""" version info, help messages, tracing configuration. """ """ version info, help messages, tracing configuration. """
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import os import os
import sys import sys
from argparse import Action from argparse import Action

View File

@ -8,10 +8,6 @@ Based on initial code from Ross Lawley.
Output conforms to https://github.com/jenkinsci/xunit-plugin/blob/master/ Output conforms to https://github.com/jenkinsci/xunit-plugin/blob/master/
src/main/resources/org/jenkinsci/plugins/xunit/types/model/xsd/junit-10.xsd src/main/resources/org/jenkinsci/plugins/xunit/types/model/xsd/junit-10.xsd
""" """
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import functools import functools
import os import os
import re import re

View File

@ -1,8 +1,4 @@
""" Access and control log capturing. """ """ Access and control log capturing. """
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import logging import logging
import re import re
from contextlib import contextmanager from contextlib import contextmanager

View File

@ -1,8 +1,4 @@
""" core implementation of testing process: init, session, runtest loop. """ """ core implementation of testing process: init, session, runtest loop. """
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import fnmatch import fnmatch
import functools import functools
import os import os

View File

@ -1,8 +1,4 @@
""" generic mechanism for marking and selecting python functions. """ """ generic mechanism for marking and selecting python functions. """
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from .legacy import matchkeyword from .legacy import matchkeyword
from .legacy import matchmark from .legacy import matchmark
from .structures import EMPTY_PARAMETERSET_OPTION from .structures import EMPTY_PARAMETERSET_OPTION

View File

@ -1,8 +1,4 @@
""" monkeypatching and mocking functionality. """ """ monkeypatching and mocking functionality. """
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import os import os
import re import re
import sys import sys

View File

@ -1,7 +1,3 @@
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import os import os
import warnings import warnings

View File

@ -1,8 +1,4 @@
""" run test suites written for nose. """ """ run test suites written for nose. """
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import sys import sys
import six import six

View File

@ -2,10 +2,6 @@
exception classes and constants handling test outcomes exception classes and constants handling test outcomes
as well as functions creating them as well as functions creating them
""" """
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import sys import sys
from packaging.version import Version from packaging.version import Version

View File

@ -1,8 +1,4 @@
""" submit failure or test session information to a pastebin service. """ """ submit failure or test session information to a pastebin service. """
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import tempfile import tempfile
import six import six

View File

@ -14,7 +14,6 @@ from os.path import sep
from posixpath import sep as posix_sep from posixpath import sep as posix_sep
import six import six
from six.moves import map
if sys.version_info[:2] >= (3, 6): if sys.version_info[:2] >= (3, 6):

View File

@ -1,8 +1,4 @@
"""(disabled by default) support for testing pytest and pytest plugins.""" """(disabled by default) support for testing pytest and pytest plugins."""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import codecs import codecs
import gc import gc
import os import os

View File

@ -1,8 +1,4 @@
""" Python test discovery, setup and run of test functions. """ """ Python test discovery, setup and run of test functions. """
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import collections import collections
import enum import enum
import fnmatch import fnmatch

View File

@ -1,5 +1,3 @@
from __future__ import absolute_import
import math import math
import pprint import pprint
import sys import sys
@ -8,11 +6,10 @@ from collections.abc import Iterable
from collections.abc import Mapping from collections.abc import Mapping
from collections.abc import Sized from collections.abc import Sized
from decimal import Decimal from decimal import Decimal
from itertools import filterfalse
from numbers import Number from numbers import Number
from more_itertools.more import always_iterable from more_itertools.more import always_iterable
from six.moves import filterfalse
from six.moves import zip
import _pytest._code import _pytest._code
from _pytest import deprecated from _pytest import deprecated

View File

@ -1,8 +1,4 @@
""" recording warnings during test function execution. """ """ recording warnings during test function execution. """
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import inspect import inspect
import re import re
import sys import sys

View File

@ -1,10 +1,6 @@
""" log machine-parseable test session result information in a plain """ log machine-parseable test session result information in a plain
text file. text file.
""" """
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import os import os
import py import py

View File

@ -1,8 +1,4 @@
""" basic collect and runtest protocol implementations """ """ basic collect and runtest protocol implementations """
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import bdb import bdb
import os import os
import sys import sys

View File

@ -1,7 +1,3 @@
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import sys import sys
import pytest import pytest

View File

@ -1,7 +1,3 @@
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import pytest import pytest

View File

@ -1,8 +1,4 @@
""" support for skip/xfail functions and markers. """ """ support for skip/xfail functions and markers. """
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from _pytest.config import hookimpl from _pytest.config import hookimpl
from _pytest.mark.evaluate import MarkEvaluator from _pytest.mark.evaluate import MarkEvaluator
from _pytest.outcomes import fail from _pytest.outcomes import fail

View File

@ -2,10 +2,6 @@
This is a good source for looking at the various reporting hooks. This is a good source for looking at the various reporting hooks.
""" """
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import argparse import argparse
import collections import collections
import platform import platform

View File

@ -1,8 +1,4 @@
""" support for providing temporary directories to test functions. """ """ support for providing temporary directories to test functions. """
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import os import os
import re import re
import tempfile import tempfile

View File

@ -1,8 +1,4 @@
""" discovery and running of std-library "unittest" style tests. """ """ discovery and running of std-library "unittest" style tests. """
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import sys import sys
import traceback import traceback

View File

@ -1,7 +1,3 @@
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import sys import sys
import warnings import warnings
from contextlib import contextmanager from contextlib import contextmanager

View File

@ -1,7 +1,3 @@
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import os import os
import sys import sys
import textwrap import textwrap

View File

@ -1,7 +1,3 @@
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import sys import sys
from unittest import mock from unittest import mock

View File

@ -1,15 +1,11 @@
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import operator import operator
import os import os
import queue
import sys import sys
import textwrap import textwrap
import py import py
import six import six
from six.moves import queue
import _pytest import _pytest
import pytest import pytest

View File

@ -1,10 +1,6 @@
# flake8: noqa # flake8: noqa
# disable flake check on this file because some constructs are strange # disable flake check on this file because some constructs are strange
# or redundant on purpose and can't be disable on a line-by-line basis # or redundant on purpose and can't be disable on a line-by-line basis
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import ast import ast
import inspect import inspect
import sys import sys

View File

@ -1,7 +1,3 @@
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import os import os
import pytest import pytest

View File

@ -1,7 +1,3 @@
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import subprocess import subprocess
import sys import sys

View File

@ -1,7 +1,3 @@
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import collections.abc as collections_abc import collections.abc as collections_abc
import sys import sys
import textwrap import textwrap

View File

@ -1,7 +1,3 @@
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import ast import ast
import glob import glob
import os import os

View File

@ -1,7 +1,3 @@
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import os import os
import shutil import shutil
import sys import sys

View File

@ -1,7 +1,3 @@
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import contextlib import contextlib
import io import io
import os import os

View File

@ -1,7 +1,3 @@
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import os import os
import pprint import pprint
import sys import sys

View File

@ -1,7 +1,3 @@
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import sys import sys
from functools import wraps from functools import wraps

View File

@ -1,7 +1,3 @@
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import sys import sys
import textwrap import textwrap

View File

@ -1,7 +1,3 @@
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import textwrap import textwrap
import py import py

View File

@ -1,7 +1,3 @@
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import textwrap import textwrap
import pytest import pytest

View File

@ -1,7 +1,3 @@
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import importlib_metadata import importlib_metadata

View File

@ -1,7 +1,3 @@
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import pytest import pytest
from _pytest.main import EXIT_NOTESTSCOLLECTED from _pytest.main import EXIT_NOTESTSCOLLECTED

View File

@ -1,7 +1,3 @@
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import os import os
from xml.dom import minidom from xml.dom import minidom

View File

@ -1,7 +1,3 @@
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import os import os
import sys import sys
from unittest import mock from unittest import mock

View File

@ -1,7 +1,3 @@
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import os import os
import re import re
import sys import sys

View File

@ -1,7 +1,3 @@
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import pytest import pytest

View File

@ -1,7 +1,3 @@
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import argparse import argparse
import distutils.spawn import distutils.spawn
import os import os

View File

@ -1,7 +1,3 @@
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import pytest import pytest

View File

@ -1,7 +1,3 @@
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import os import os
import sys import sys

View File

@ -1,7 +1,3 @@
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import os import os
import sys import sys
import types import types

View File

@ -1,7 +1,3 @@
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import os import os
import subprocess import subprocess
import sys import sys

View File

@ -1,7 +1,3 @@
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import re import re
import warnings import warnings

View File

@ -1,7 +1,3 @@
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import os import os
import py import py

View File

@ -1,7 +1,3 @@
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import inspect import inspect
import os import os
import sys import sys

View File

@ -2,10 +2,6 @@
test correct setup/teardowns at test correct setup/teardowns at
module, class, and instance level module, class, and instance level
""" """
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import pytest import pytest

View File

@ -1,7 +1,3 @@
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import pytest import pytest
from _pytest.main import EXIT_NOTESTSCOLLECTED from _pytest.main import EXIT_NOTESTSCOLLECTED

View File

@ -1,7 +1,3 @@
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import sys import sys
import pytest import pytest

View File

@ -1,10 +1,6 @@
""" """
terminal reporting of the full testing process. terminal reporting of the full testing process.
""" """
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import collections import collections
import os import os
import sys import sys

View File

@ -1,7 +1,3 @@
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import sys import sys
import attr import attr

View File

@ -1,7 +1,3 @@
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import gc import gc
import pytest import pytest

View File

@ -1,5 +1,3 @@
from __future__ import unicode_literals
import warnings import warnings
import pytest import pytest