mirror of
https://github.com/PyCQA/flake8.git
synced 2026-04-05 04:36:52 +00:00
Configure flake8-import-order to use Google Style
This relies on two things: 1. Properly configuring flake8-import-order to use that style 2. Properly configuring flake8-import-order to know that flake8 is our application name.
This commit is contained in:
parent
3f434f7d1c
commit
8bc76f79de
17 changed files with 43 additions and 45 deletions
|
|
@ -1,12 +1,12 @@
|
|||
"""Test aggregation of config files and command-line options."""
|
||||
import os
|
||||
|
||||
import pytest
|
||||
|
||||
from flake8.main import options
|
||||
from flake8.options import aggregator
|
||||
from flake8.options import manager
|
||||
|
||||
import pytest
|
||||
|
||||
CLI_SPECIFIED_CONFIG = 'tests/fixtures/config_files/cli-specified.ini'
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -1,13 +1,12 @@
|
|||
"""Tests for the BaseFormatter object."""
|
||||
import optparse
|
||||
|
||||
import mock
|
||||
import pytest
|
||||
|
||||
from flake8 import style_guide
|
||||
from flake8.formatting import base
|
||||
|
||||
import mock
|
||||
|
||||
import pytest
|
||||
|
||||
|
||||
def options(**kwargs):
|
||||
"""Create an optparse.Values instance."""
|
||||
|
|
|
|||
|
|
@ -1,12 +1,11 @@
|
|||
"""Tests for the Manager object for FileCheckers."""
|
||||
import errno
|
||||
|
||||
from flake8 import checker
|
||||
|
||||
import mock
|
||||
|
||||
import pytest
|
||||
|
||||
from flake8 import checker
|
||||
|
||||
|
||||
def style_guide_mock(**kwargs):
|
||||
"""Create a mock StyleGuide object."""
|
||||
|
|
|
|||
|
|
@ -3,12 +3,11 @@ import configparser
|
|||
import os
|
||||
import sys
|
||||
|
||||
from flake8.options import config
|
||||
|
||||
import mock
|
||||
|
||||
import pytest
|
||||
|
||||
from flake8.options import config
|
||||
|
||||
CLI_SPECIFIED_FILEPATH = 'tests/fixtures/config_files/cli-specified.ini'
|
||||
BROKEN_CONFIG_PATH = 'tests/fixtures/config_files/broken.ini'
|
||||
|
||||
|
|
|
|||
|
|
@ -1,13 +1,12 @@
|
|||
"""Unit tests for flake8.options.config.MergedConfigParser."""
|
||||
import os
|
||||
|
||||
import mock
|
||||
import pytest
|
||||
|
||||
from flake8.options import config
|
||||
from flake8.options import manager
|
||||
|
||||
import mock
|
||||
|
||||
import pytest
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
def optmanager():
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
"""Unit tests for the Notifier object."""
|
||||
from flake8.plugins import notifier
|
||||
|
||||
import pytest
|
||||
|
||||
from flake8.plugins import notifier
|
||||
|
||||
|
||||
class _Listener(object):
|
||||
def __init__(self, error_code):
|
||||
|
|
|
|||
|
|
@ -1,10 +1,9 @@
|
|||
"""Unit tests for flake8.options.manager.Option."""
|
||||
from flake8.options import manager
|
||||
|
||||
import mock
|
||||
|
||||
import pytest
|
||||
|
||||
from flake8.options import manager
|
||||
|
||||
|
||||
def test_to_optparse():
|
||||
"""Test conversion to an optparse.Option class."""
|
||||
|
|
|
|||
|
|
@ -2,10 +2,10 @@
|
|||
import optparse
|
||||
import os
|
||||
|
||||
from flake8.options import manager
|
||||
|
||||
import pytest
|
||||
|
||||
from flake8.options import manager
|
||||
|
||||
TEST_VERSION = '3.0.0b1'
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -1,13 +1,12 @@
|
|||
"""Tests for flake8.plugins.manager.Plugin."""
|
||||
import optparse
|
||||
|
||||
import mock
|
||||
import pytest
|
||||
|
||||
from flake8 import exceptions
|
||||
from flake8.plugins import manager
|
||||
|
||||
import mock
|
||||
|
||||
import pytest
|
||||
|
||||
|
||||
def test_load_plugin_fallsback_on_old_setuptools():
|
||||
"""Verify we fallback gracefully to on old versions of setuptools."""
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
"""Tests for flake8.plugins.manager.PluginManager."""
|
||||
from flake8.plugins import manager
|
||||
|
||||
import mock
|
||||
|
||||
from flake8.plugins import manager
|
||||
|
||||
|
||||
def create_entry_point_mock(name):
|
||||
"""Create a mocked EntryPoint."""
|
||||
|
|
|
|||
|
|
@ -1,13 +1,12 @@
|
|||
"""Tests for flake8.plugins.manager.PluginTypeManager."""
|
||||
import collections
|
||||
|
||||
import mock
|
||||
import pytest
|
||||
|
||||
from flake8 import exceptions
|
||||
from flake8.plugins import manager
|
||||
|
||||
import mock
|
||||
|
||||
import pytest
|
||||
|
||||
TEST_NAMESPACE = "testing.plugin-type-manager"
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -1,14 +1,13 @@
|
|||
"""Tests for the flake8.style_guide.StyleGuide class."""
|
||||
import optparse
|
||||
|
||||
import mock
|
||||
import pytest
|
||||
|
||||
from flake8 import style_guide
|
||||
from flake8.formatting import base
|
||||
from flake8.plugins import notifier
|
||||
|
||||
import mock
|
||||
|
||||
import pytest
|
||||
|
||||
|
||||
def create_options(**kwargs):
|
||||
"""Create and return an instance of optparse.Values."""
|
||||
|
|
|
|||
|
|
@ -1,13 +1,11 @@
|
|||
"""Tests for flake8's utils module."""
|
||||
import os
|
||||
|
||||
from flake8 import utils
|
||||
from flake8.plugins import manager as plugin_manager
|
||||
|
||||
import mock
|
||||
|
||||
import pytest
|
||||
|
||||
from flake8 import utils
|
||||
from flake8.plugins import manager as plugin_manager
|
||||
|
||||
RELATIVE_PATHS = ["flake8", "pep8", "pyflakes", "mccabe"]
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue