Skip to content

Automatically import when user shift+enter to use methods before actually importing #22329

Closed as not planned

Description

@TylerLeonhardt

Testing #22287

import string

for letter in string.ascii_lowercase[::-1]:
    print(letter)

If I haven't shift+enter on import string yet and I go to shift+enter on the for loop, I get:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
NameError: name 'string' is not defined

which makes sense based on the TPI... however, as a suspect some folks may have large files with many imports at the top, it'd be nice if those imports were automatically run.

Activity

  1. changed the title [-]Could imports be included?[/-] [+]Automatically import when user shift+enter to use methods before actually importing[/+] on Oct 24, 2023
  2. anthonykim1 commented on Oct 24, 2023

    @anthonykim1

    Thank you for the idea! Will bring it up to the team.

  3. github-actions commented on Oct 25, 2023

    @github-actions

    Thanks for the feature request! We are going to give the community 60 days from when this issue was created to provide 7 👍 upvotes on the opening comment to gauge general interest in this idea. If there's enough upvotes then we will consider this feature request in our future planning. If there's unfortunately not enough upvotes then we will close this issue.

  4. brettcannon commented on Jan 11, 2024

    @brettcannon
    Member

    Thank you for submitting your feature request and everyone who considered it! Unfortunately, this issue did not receive enough votes over the allotted time, and so we are closing the issue.

  5. locked as resolved and limited conversation to collaborators on Feb 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    feature-requestRequest for new features or functionality

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions