Merge pull request #4693 from asottile/flake8_3_7_0
fixes for flake8 3.7
This commit is contained in:
		
						commit
						b96e162131
					
				| 
						 | 
					@ -1,7 +1,7 @@
 | 
				
			||||||
exclude: doc/en/example/py2py3/test_py2.py
 | 
					exclude: doc/en/example/py2py3/test_py2.py
 | 
				
			||||||
repos:
 | 
					repos:
 | 
				
			||||||
-   repo: https://github.com/ambv/black
 | 
					-   repo: https://github.com/ambv/black
 | 
				
			||||||
    rev: 18.6b4
 | 
					    rev: 18.9b0
 | 
				
			||||||
    hooks:
 | 
					    hooks:
 | 
				
			||||||
    -   id: black
 | 
					    -   id: black
 | 
				
			||||||
        args: [--safe, --quiet]
 | 
					        args: [--safe, --quiet]
 | 
				
			||||||
| 
						 | 
					@ -13,7 +13,7 @@ repos:
 | 
				
			||||||
        additional_dependencies: [black==18.9b0]
 | 
					        additional_dependencies: [black==18.9b0]
 | 
				
			||||||
        language_version: python3
 | 
					        language_version: python3
 | 
				
			||||||
-   repo: https://github.com/pre-commit/pre-commit-hooks
 | 
					-   repo: https://github.com/pre-commit/pre-commit-hooks
 | 
				
			||||||
    rev: v2.0.0
 | 
					    rev: v2.1.0
 | 
				
			||||||
    hooks:
 | 
					    hooks:
 | 
				
			||||||
    -   id: trailing-whitespace
 | 
					    -   id: trailing-whitespace
 | 
				
			||||||
    -   id: end-of-file-fixer
 | 
					    -   id: end-of-file-fixer
 | 
				
			||||||
| 
						 | 
					@ -21,20 +21,23 @@ repos:
 | 
				
			||||||
    -   id: debug-statements
 | 
					    -   id: debug-statements
 | 
				
			||||||
        exclude: _pytest/debugging.py
 | 
					        exclude: _pytest/debugging.py
 | 
				
			||||||
        language_version: python3
 | 
					        language_version: python3
 | 
				
			||||||
 | 
					-   repo: https://gitlab.com/pycqa/flake8
 | 
				
			||||||
 | 
					    rev: 3.7.0
 | 
				
			||||||
 | 
					    hooks:
 | 
				
			||||||
    -   id: flake8
 | 
					    -   id: flake8
 | 
				
			||||||
        language_version: python3
 | 
					        language_version: python3
 | 
				
			||||||
-   repo: https://github.com/asottile/reorder_python_imports
 | 
					-   repo: https://github.com/asottile/reorder_python_imports
 | 
				
			||||||
    rev: v1.3.3
 | 
					    rev: v1.3.5
 | 
				
			||||||
    hooks:
 | 
					    hooks:
 | 
				
			||||||
    -   id: reorder-python-imports
 | 
					    -   id: reorder-python-imports
 | 
				
			||||||
        args: ['--application-directories=.:src']
 | 
					        args: ['--application-directories=.:src']
 | 
				
			||||||
-   repo: https://github.com/asottile/pyupgrade
 | 
					-   repo: https://github.com/asottile/pyupgrade
 | 
				
			||||||
    rev: v1.10.1
 | 
					    rev: v1.11.1
 | 
				
			||||||
    hooks:
 | 
					    hooks:
 | 
				
			||||||
    -   id: pyupgrade
 | 
					    -   id: pyupgrade
 | 
				
			||||||
        args: [--keep-percent-format]
 | 
					        args: [--keep-percent-format]
 | 
				
			||||||
-   repo: https://github.com/pre-commit/pygrep-hooks
 | 
					-   repo: https://github.com/pre-commit/pygrep-hooks
 | 
				
			||||||
    rev: v1.1.0
 | 
					    rev: v1.2.0
 | 
				
			||||||
    hooks:
 | 
					    hooks:
 | 
				
			||||||
    -   id: rst-backticks
 | 
					    -   id: rst-backticks
 | 
				
			||||||
-   repo: local
 | 
					-   repo: local
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -437,7 +437,7 @@ class PytestPluginManager(PluginManager):
 | 
				
			||||||
                    and not self._using_pyargs
 | 
					                    and not self._using_pyargs
 | 
				
			||||||
                ):
 | 
					                ):
 | 
				
			||||||
                    from _pytest.deprecated import (
 | 
					                    from _pytest.deprecated import (
 | 
				
			||||||
                        PYTEST_PLUGINS_FROM_NON_TOP_LEVEL_CONFTEST
 | 
					                        PYTEST_PLUGINS_FROM_NON_TOP_LEVEL_CONFTEST,
 | 
				
			||||||
                    )
 | 
					                    )
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                    fail(
 | 
					                    fail(
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -307,8 +307,8 @@ class FuncFixtureInfo(object):
 | 
				
			||||||
    # fixture names specified via usefixtures and via autouse=True in fixture
 | 
					    # fixture names specified via usefixtures and via autouse=True in fixture
 | 
				
			||||||
    # definitions.
 | 
					    # definitions.
 | 
				
			||||||
    initialnames = attr.ib(type=tuple)
 | 
					    initialnames = attr.ib(type=tuple)
 | 
				
			||||||
    names_closure = attr.ib()  # type: List[str]
 | 
					    names_closure = attr.ib()  # List[str]
 | 
				
			||||||
    name2fixturedefs = attr.ib()  # type: List[str, List[FixtureDef]]
 | 
					    name2fixturedefs = attr.ib()  # List[str, List[FixtureDef]]
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    def prune_dependency_tree(self):
 | 
					    def prune_dependency_tree(self):
 | 
				
			||||||
        """Recompute names_closure from initialnames and name2fixturedefs
 | 
					        """Recompute names_closure from initialnames and name2fixturedefs
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -217,7 +217,7 @@ class LogCaptureFixture(object):
 | 
				
			||||||
        """Creates a new funcarg."""
 | 
					        """Creates a new funcarg."""
 | 
				
			||||||
        self._item = item
 | 
					        self._item = item
 | 
				
			||||||
        # dict of log name -> log level
 | 
					        # dict of log name -> log level
 | 
				
			||||||
        self._initial_log_levels = {}  # type: Dict[str, int]
 | 
					        self._initial_log_levels = {}  # Dict[str, int]
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    def _finalize(self):
 | 
					    def _finalize(self):
 | 
				
			||||||
        """Finalizes the fixture.
 | 
					        """Finalizes the fixture.
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -143,9 +143,9 @@ class Mark(object):
 | 
				
			||||||
    #: name of the mark
 | 
					    #: name of the mark
 | 
				
			||||||
    name = attr.ib(type=str)
 | 
					    name = attr.ib(type=str)
 | 
				
			||||||
    #: positional arguments of the mark decorator
 | 
					    #: positional arguments of the mark decorator
 | 
				
			||||||
    args = attr.ib()  # type: List[object]
 | 
					    args = attr.ib()  # List[object]
 | 
				
			||||||
    #: keyword arguments of the mark decorator
 | 
					    #: keyword arguments of the mark decorator
 | 
				
			||||||
    kwargs = attr.ib()  # type: Dict[str, object]
 | 
					    kwargs = attr.ib()  # Dict[str, object]
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    def combined_with(self, other):
 | 
					    def combined_with(self, other):
 | 
				
			||||||
        """
 | 
					        """
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -204,7 +204,7 @@ class CallInfo(object):
 | 
				
			||||||
    """ Result/Exception info a function invocation. """
 | 
					    """ Result/Exception info a function invocation. """
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    _result = attr.ib()
 | 
					    _result = attr.ib()
 | 
				
			||||||
    # type: Optional[ExceptionInfo]
 | 
					    # Optional[ExceptionInfo]
 | 
				
			||||||
    excinfo = attr.ib()
 | 
					    excinfo = attr.ib()
 | 
				
			||||||
    start = attr.ib()
 | 
					    start = attr.ib()
 | 
				
			||||||
    stop = attr.ib()
 | 
					    stop = attr.ib()
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue