Skip to content

Auto import introduces syntax errors in files with from __future__ import annotations #1382

@sharkdp

Description

@sharkdp

Summary

Auto import adds new import statements at the beginning of the file. This breaks possible from __future__ import annotations statements which need to be at the top.

Before (https://play.ty.dev/756bd987-60fd-494c-9d1a-9270493f064d):

Image

After:

Image

Version

a21cde8a5

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingcompletionsBugs or features relating to autocomplete suggestionsserverRelated to the LSP server

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions