New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
isort needs to have the filename passed in as an arg #3806
Comments
Actually, I just had a look at the fixer itself and I am not sure how to go about fixing this since the stdin stream filename isn't anywhere I can see. Does anyone have an idea of how to accomplish this? ale/autoload/ale/fixers/isort.vim Lines 29 to 33 in f0887d3
|
@jeffwillette you can use %s placeholder and it will be replaced with the absolute filename by ALE. Something like below should do what you need:
Feel free to make a PR if the change fixes this issue and does not break anything else. |
Should be fixed with #3815 |
Using the isort fixer is convenient in python except for when editing
__init__.py
files which often need their imports in a specifici order which gets undone when I save the file and the fixers run.let g:ale_python_isort_options = '--skip __init__.py --filter-files
)isort --skip __init__.py --filter-files - < /tmp/nvim0aAePZ/10745/__init__.py
so the command called by ALE directly should have the
--filename
option added so that users custom args given to isort can work off the filename since the stdin stream doesn't give any file information. I don't have time to do this now, but I will leave this issue here and get to it when I have some free time if no one else takes it up.The text was updated successfully, but these errors were encountered: