Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 27 additions & 4 deletions website/docs/IDE-features.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -229,10 +229,33 @@ Code actions are automated fixes and refactorings that Pyrefly offers through yo

When Pyrefly detects a type error, it may offer a quick fix — a one-click resolution available via the lightbulb menu (<kbd>Cmd+.</kbd> / <kbd>Ctrl+.</kbd>). Currently supported:

| Quick fix | Description |
|---|---|
| **Add missing import** | Automatically add an import statement for an unresolved name |
| **Remove redundant cast** | Remove a `typing.cast()` call where the argument already has the target type |
**Add missing import**

Automatically add an import statement for an unresolved name.

<video
src="/videos/code-action-add-import.mp4"
width="720"
muted
loop
autoPlay
playsInline
preload="metadata"
/>

**Remove redundant cast**

Remove a `typing.cast()` call where the argument already has the target type.

<video
src="/videos/code-action-remove-cast.mp4"
width="720"
muted
loop
autoPlay
playsInline
preload="metadata"
/>

#### Fix All

Expand Down
Binary file added website/static/videos/code-action-add-import.mp4
Binary file not shown.
Binary file added website/static/videos/code-action-remove-cast.mp4
Binary file not shown.
Loading