You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Create a file named example_parenth_forms.py with the following content:
parenth_form_without_comma= (
"This is an expression list parenth_form without comma ""yielding a single expression made up by the expression list ""as defined in the Python 3 Documentation ""» The Python Language Reference ""» 6. Expressions ""» 6.2.3. Parenthesized forms ""which can be viewed at ""https://docs.python.org/3/reference/expressions.html#parenthesized-forms"
)
assertisinstance(parenth_form_without_comma, str), (
"This is a single expression parenth_form without comma yielding a string"
)
parenth_form_with_comma= (
"This is a single expression parenth_form with comma yielding a tuple",
)
assertisinstance(parenth_form_with_comma, tuple), (
"This is a %s %s single expression parenth_form without comma"%
("more", "complex")
)
Open the file and observe how only the parenth_form_with_comma expression can be folded, none of the parenth_form expressions without commas can be folded.
Extension version: 2022.7.40
VS Code version: Code 1.69.2 (3b889b090b5ad5793f524b5d1d39fda662b96a2a, 2022-07-18T16:14:10.636Z)
OS version: Linux x64 5.15.0-41-generic
Restricted Mode: Yes
System Info
Item
Value
CPUs
11th Gen Intel(R) Core(TM) i7-1185G7 @ 3.00GHz (8 x 1700)
I've just tried the pre-release Pylance extension version v2022.7.41 and the issue remains. I hope you find the text in my example file useful to help resolve these issues. 🙂
Issue Type: Bug
example_parenth_forms.py
with the following content:parenth_form_with_comma
expression can be folded, none of the parenth_form expressions without commas can be folded.Extension version: 2022.7.40
VS Code version: Code 1.69.2 (3b889b090b5ad5793f524b5d1d39fda662b96a2a, 2022-07-18T16:14:10.636Z)
OS version: Linux x64 5.15.0-41-generic
Restricted Mode: Yes
System Info
canvas_oop_rasterization: disabled_off
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: enabled
multiple_raster_threads: enabled_on
opengl: enabled_on
rasterization: enabled
raw_draw: disabled_off_ok
skia_renderer: enabled_on
video_decode: disabled_software
video_encode: disabled_software
vulkan: disabled_off
webgl: enabled
webgl2: enabled
The text was updated successfully, but these errors were encountered: