-
Notifications
You must be signed in to change notification settings - Fork 2
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
BLACK-ISORT linter fails on Windows when black==24.1.1 and Python==3.9 #93
Comments
do we try stdin? |
It is still failing even after switching to stdin. I am not sure what is going on. |
It has to be run within lintrunner, and python 3.9, and black==24.1.1, and Windows. Somehow the interaction among these tools and platforms caused the behavior. Does lintrunner set stdin on Windows the interfered with the tools? But only on Windows with Python 3.8/3.9? |
I am trying to debug with black to make sure stdin is not empty when accepted by black, but I haven't been able to set breakpoints in black in my current environment. I am not sure which installation it was using. |
I suspect black somehow failed to recognize there's stuff in stdin under certain conditions. |
psf/black#4209 is created. |
Thanks for the investigation! Good catch that I didn’t actually look into the path files and forgot they were different. |
… black file path handling (#92) Fixes #93. This change uses `Path().resolve()` on the file path provided to black to avoid a bug described in psf/black#4209.
This linter processes the file with isort before sending the result to black as
input
to the subprocess.In
lintrunner-adapters/lintrunner_adapters/adapters/black_isort_linter.py
Lines 42 to 58 in c9727c9
input
argument was somehow not taken byblack
whenblack==24.1.1
on Windows, Python 3.8/Python 3.9.Maybe consider pipeline the results instead and send it via stdin?
The text was updated successfully, but these errors were encountered: