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

Cannot seem to trigger I201 or I202 errors #121

Closed john-bodley closed 6 years ago

john-bodley commented 6 years ago

I'm unsure why but I am unable to trigger either the I201 or I202 errors, i.e, if I have code of the form, where both packages should be in the same section,

import collections

import os

no errors are triggered. Note for context my flake8 configuration is:

> flake8 --version
3.5.0 (flake8_commas._base: 0.4.3, flake8_quotes: 0.11.0, import-order: 0.14.3, mccabe: 0.6.1, pycodestyle: 2.3.1, pyflakes: 1.6.0) CPython 2.7.13 on Darwin

and my tox.ini file is:

[flake8]
import-order-style = google

[testenv:flake8]
deps =
    flake8
    flake8-import-order
commands = flake8

[tox]
envlist = flake8

Note if I change the error code from I202 here to read I100 say the error is present, and thus I wonder whether there may be a registration issue.

john-bodley commented 6 years ago

This seems to be related to https://github.com/PyCQA/flake8-import-order/issues/119. Per the suggestion there, I rebuilt the package from the master branch and confirmed that the issue was resolved.

pgjones commented 6 years ago

Thanks for confirming.