Skip to content

Commit 3525ff6

Browse files
committed
Add pylance updates
1 parent c708e80 commit 3525ff6

File tree

3 files changed

+25
-0
lines changed

3 files changed

+25
-0
lines changed
Lines changed: 3 additions & 0 deletions
Loading
Lines changed: 3 additions & 0 deletions
Loading

release-notes/v1_100.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,25 @@ You can learn more about these features in the [Remote Development release notes
137137

138138
### Python
139139

140+
#### Color picker when using Pylance
141+
142+
Pylance can now display an interactive color swatch directly in the editor for recognized color values in Python files, making it easier to visualize and pick colors on the fly. To try it out, you can enable `setting(python.analysis.enableColorPicker:true)`. Supported formats include #RGB (like "#001122") and #RGBA (like "#001122FF").
143+
144+
![Color swatch displayed in the editor next to #RGB color format.](images/1_100/pylance-color-picker.png)
145+
146+
#### AI Code Actions: Convert Format String
147+
148+
When using Pylance, there's a new experimental AI Code Action for converting string concatenations to f-string or format(). To try it out, select the **Convert to f-string with Copilot** or the **Convert to format() call with Copilot** Code Actions through the light bulb when selecting a symbol in the string you wish to convert, or through `kbstyle(Ctrl+.)`/`kbstyle(Cmd+.)`.
149+
150+
![Convert strings Code Actions, powered by Copilot](images/1_100/pylance-convert-string.png)
151+
152+
This experience is enabled via the following setting:
153+
```
154+
"python.analysis.aiCodeActions": {"convertFormatString": true}
155+
```
156+
157+
Then once you define a new symbol, for example, a class or a function, you can select the **Generate Symbol with Copilot** Code Action and let Copilot handle the implementation! If you want, you can then leverage Pylance's **Move Symbol** Code Actions to move it to a different file.
158+
140159

141160
### GitHub Pull Requests and Issues
142161

0 commit comments

Comments
 (0)