Skip to content

Remove Pylance auto-import when typing the letter d to avoid being serenaded with The Zen of Python #146783

@hgibling

Description

@hgibling

Hello,

After a lot of head scratching as to why my python script was suddenly reciting The Zen of Python this afternoon, I learned it was because my code had from this import d added to the top. I did not type that though.

After more head scratching I learned it was because I had typed a single letter d and accidentally hit enter before finishing my variable. Capital D triggers this as well.

I see how the auto-import functions are useful, but since this particular case adds a module that outputs a lengthy poem, perhaps this can be disabled, or more text can be required, or there can be a two-step confirmation process? It has bungled up at least one other person.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions