Setting sortImports.args produces Invalid patch string
See original GitHub issueIssue Type: Bug
I recently set the following option to improve the compatibility of isort
with black
:
"python.sortImports.args": [
"--profile", "black"
]
However, the following error occurs when activating it:
Invalid patch string: >>>PYTHON-EXEC-OUTPUT
This does not happen if this option is not set. Maybe there is a problem with escaping the parameters?
Extension version: 2022.4.0 VS Code version: Code 1.66.0 (e18005f0f1b33c29e81d732535d8c0e47cafb0b5, 2022-03-30T05:50:04.419Z) OS version: Darwin x64 19.6.0 Restricted Mode: No
System Info
Item | Value |
---|---|
CPUs | Intel® Core™ i7-5557U CPU @ 3.10GHz (4 x 3100) |
GPU Status | 2d_canvas: enabled canvas_oop_rasterization: disabled_off direct_rendering_display_compositor: disabled_off_ok gpu_compositing: enabled metal: disabled_off multiple_raster_threads: enabled_on oop_rasterization: enabled opengl: enabled_on rasterization: enabled raw_draw: disabled_off_ok skia_renderer: enabled_on video_decode: enabled video_encode: enabled webgl: enabled webgl2: enabled |
Load (avg) | 5, 7, 8 |
Memory (System) | 16.00GB (0.34GB free) |
Process Argv | |
Screen Reader | no |
VM | 0% |
Issue Analytics
- State:
- Created a year ago
- Reactions:3
- Comments:12 (3 by maintainers)
Top Results From Across the Web
How to configure line length for VS Code python Sort Imports ...
From the documentation, it seems like "python.sortImports.args": ["-l", "100"] should work, but it's giving me an error: Invalid patch string ...
Read more >Settings Reference for Python - Visual Studio Code
Settings Reference for the Python extension in Visual Studio Code. ... Diagnostics for invalid escape sequences used within string literals.
Read more >Pylint features - Pylint 2.16.0-dev documentation
TypeVar cannot be both covariant and contravariant Emitted when both the "covariant" and "contravariant" keyword arguments are set to "True" in a TypeVar....
Read more >Changelog — documentación de Python - 3.6.15
bpo-35643: Fixed a SyntaxWarning: invalid escape sequence in Modules/_sha3/cleanup.py. Patch by Mickaël Schoentgen. bpo-35121: Don't set cookie for a request ...
Read more >Configuration options for isort
Tells isort to set the known standard library based on the specified ... Python & Config File Name: py_version ... Sort imports by...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
For anyone running into this issue, please try https://marketplace.visualstudio.com/items?itemName=ms-python.isort . It might handle these cases better, and we plan on eventually switching to that extension.
We’ve a new isort extension which solves this: https://marketplace.visualstudio.com/items?itemName=ms-python.isort