PyCQA / flake8-import-order

Flake8 plugin that checks import order against various Python Style Guides
GNU Lesser General Public License v3.0
278 stars 72 forks source link

Unable to disable warnings via tox.ini #164

Closed Integralist closed 5 years ago

Integralist commented 5 years ago

I've tried the following, but my vim linter still seems to pick up the I202 error.

Is tox supported or have I just mis-configured things?

Otherwise love this plugin.

Thanks!

[flake8]
ignore = E261,E265,E402
# http://pep8.readthedocs.org/en/latest/intro.html#error-codes

[flake8-import-order]
ignore = I202
# https://github.com/PyCQA/flake8-import-order#warnings
Integralist commented 5 years ago

Also, just as a side comment...

# standard library modules

import re
from datetime import datetime, timedelta
from functools import partial

# external modules

from bf_api_gateway.tornado.rig import api_gateway

from bf_auth.utility import build_endpoint, configure_fetch, instr, require_auth

from bf_rig import settings

For some reason the external modules (which are identified as 'Third Party' require line breaks, but the Stdlib module imports don't?

Is that by design?

sigmavirus24 commented 5 years ago

have I just mis-configured things?

Yes. Your config should be

[flake8]
ignore = E261,E265,E402,I202
# http://pep8.readthedocs.org/en/latest/intro.html#error-codes
# https://github.com/PyCQA/flake8-import-order#warnings
Integralist commented 5 years ago

I did try that and it didn't work, but trying it again this morning it does work 🤦‍♂️

Thanks for confirming though 👍