PyCQA / isort

A Python utility / library to sort imports.
https://pycqa.github.io/isort/
MIT License
6.49k stars 580 forks source link

Configuration is not picked up #500

Closed Midnighter closed 7 years ago

Midnighter commented 7 years ago

Hi, I have a setup.cfg file with an [isort] section but it seems to me that the configuration is not being picked up. I've installed isort inside of a virtualenv and the path gets picked up correctly but maybe my environment is misconfigured in other ways. My question is: can I test somehow if the configuration file is found/applied in any way? I'm on version 4.2.5.

gregtap commented 7 years ago

I somehow see the same issue but randomly on each run.


ERROR: /opt/foobar/src/chatbot/tests.py Imports are incorrectly sorted.
ERROR: /opt/foobar/src/chatbot/urls.py Imports are incorrectly sorted.
ERROR: /opt/foobar/src/chatbot/views.py Imports are incorrectly sorted.
ERROR: /opt/foobar/src/chatbot/api/urls.py Imports are incorrectly sorted.
ERROR: /opt/foobar/src/chatbot/api/views.py Imports are incorrectly sorted.
ERROR: /opt/foobar/src/chatbot/bot/admin.py Imports are incorrectly sorted.
ERROR: /opt/foobar/src/chatbot/bot/urls.py Imports are incorrectly sorted.
ERROR: /opt/foobar/src/chatbot/bot/views.py Imports are incorrectly sorted.
ERROR: /opt/foobar/src/chatbot/messenger/admin.py Imports are incorrectly sorted.
root@e53f416b1a73:/opt/foobar/src# isort -rc -c
Skipped 8 files
root@e53f416b1a73:/opt/foobar/src# isort -rc -c
Skipped 8 files
root@e53f416b1a73:/opt/foobar/src# isort -rc -c
ERROR: /opt/foobar/src/chatbot/tests.py Imports are incorrectly sorted.
ERROR: /opt/foobar/src/chatbot/urls.py Imports are incorrectly sorted.
ERROR: /opt/foobar/src/chatbot/views.py Imports are incorrectly sorted.
ERROR: /opt/foobar/src/chatbot/api/urls.py Imports are incorrectly sorted.
ERROR: /opt/foobar/src/chatbot/api/views.py Imports are incorrectly sorted.
ERROR: /opt/foobar/src/chatbot/bot/admin.py Imports are incorrectly sorted.
ERROR: /opt/foobar/src/chatbot/bot/urls.py Imports are incorrectly sorted.
ERROR: /opt/foobar/src/chatbot/bot/views.py Imports are incorrectly sorted.
ERROR: /opt/foobar/src/chatbot/messenger/admin.py Imports are incorrectly sorted.```
timothycrosley commented 7 years ago

Closing this as I was unable to reproduce. If you are able to, can you try out the just released 4.2.8 release and see if it is still present? Thanks! ~Timothy