Skip to content
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

Fixed the issue with Black ignoring config file to tell it which file is being processed. (#3406) #4894

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

nlaburu
Copy link

@nlaburu nlaburu commented Jan 14, 2025

Fixed the issue with Black ignoring config file to tell it which file is being processed. (#3406)

Add test for stdin-filename

…analysis#3406)

Add test for stdin-filename on test/fixers/test_ruff_format_fixer_callback.vader
@@ -53,7 +60,7 @@ Execute(Pipenv is detected when python_black_auto_pipenv is set):
call ale#test#SetFilename('../test-files/python/pipenv/whatever.py')

AssertEqual
\ {'command': ale#Escape('pipenv') . ' run black -'},
\ {'command': ale#Escape('pipenv') . ' run black --stdin-filename ''/testplugin/test/test-files/python/pipenv/whatever.py'' -'},
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These paths need to also be escaped. Linter is failing on Windows because of this:

  (5/7) [EXECUTE] Pipenv is detected when python_black_auto_pipenv is set
    (5/7) [EXECUTE] (X) {'command': 'pipenv run black --stdin-filename C:\testplugin\test\test-files\python\pipenv\whatever.py -'} should be equal to {'command': 'pipenv run black --stdin-filename ''/testplugin/test/test-files/python/pipenv/whatever.py'' -'}
    (6/7) [EXECUTE] Poetry is detected when python_black_auto_poetry is set
    (6/7) [EXECUTE] (X) {'command': 'poetry run black --stdin-filename C:\testplugin\test\test-files\python\poetry\whatever.py -'} should be equal to {'command': 'poetry run black --stdin-filename ''/testplugin/test/test-files/python/poetry/whatever.py'' -'}
    (7/7) [EXECUTE] uv is detected when python_black_auto_uv is set
    (7/7) [EXECUTE] (X) {'command': 'uv run black --stdin-filename C:\testplugin\test\test-files\python\uv\whatever.py -'} should be equal to {'command': 'uv run black --stdin-filename ''/testplugin/test/test-files/python/uv/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants