Isort: --filter-files broken for absolute paths

Created on 12 Sep 2019  路  1Comment  路  Source: PyCQA/isort

I found this bug by using PyCharm FileWatchers. I was passing $FilePath$ to isort, which was, as a result, not obeying my skip settings in setup.cfg. Adding --filter-files made it so isort was skipping all files.

The fix for me was to pass in a relative path, $FilePathRelativeToProjectRoot$. However, I still think that absolute paths should be filtered properly, based on the current working directory.

[9:40:44] [basepi@corellia] [~/src/apm-agent-python] [master]
卤 pwd
/Users/basepi/src/apm-agent-python

[9:40:52] [basepi@corellia] [~/src/apm-agent-python] [master]
卤 /usr/local/bin/isort --filter-files /Users/basepi/src/apm-agent-python/elasticapm/base.py
Skipped 1 files

[9:40:55] [basepi@corellia] [~/src/apm-agent-python] [master]
卤 /usr/local/bin/isort --filter-files elasticapm/base.py

isort version 4.3.21

bug

Most helpful comment

Closing as this is likely resolved in the 5.x.x series. Feel free to open a new issue if this persists for you.

Thanks!

~Timothy

>All comments

Closing as this is likely resolved in the 5.x.x series. Feel free to open a new issue if this persists for you.

Thanks!

~Timothy

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ionelmc picture ionelmc  路  3Comments

darkclouder picture darkclouder  路  3Comments

AlexandreYang picture AlexandreYang  路  3Comments

whg517 picture whg517  路  3Comments

peteboothroyd picture peteboothroyd  路  3Comments