Closed skorokithakis closed 7 years ago
This looks suspicious, but I'll need more information. What version are you using, have you set the application import names if so to what? Do you have a reproducible example? Thanks.
Yes, sorry. Here:
13:47:11 $ flake8 --version
3.2.1 (naming: 0.4.1, mccabe: 0.5.3, pyflakes: 1.3.0, flake8-tidy-imports: 1.0.3, import-order: 0.11, pycodestyle: 2.2.0) CPython 2.7.11+ on Linux
13:47:33 $ cat test.py
import pychromecast
import youtube_dl
pychromecast.test(youtube_dl)
13:47:58 $ flake8 test.py
test.py:2:1: I201 Missing newline before sections or imports.
Ah, I see. This is the correct response for the cryptography style which is the default. This style requires that each 3rd party import has its own section. I suspect you may want to use the google style, import-order-style = google
.
Here is an example google and cryptography set.
I'll close this, but feel free to comment/open if needed.
Ahh, I didn't realize that, thank you!
But where is this option set?
In setup.cfg
.
@aidanrussell take a look at http://flake8.pycqa.org/en/latest/user/configuration.html
I'm seeing flake8-import-order complain about this:
It's saying that it needs a newline before youtube_dl. Should that be so? Why should I need to insert a newline there?