Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Preferimport to__import__#82

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged

Conversation

zwimer
Copy link
Contributor

What

In__init__.py there is a loop that invokes__import__ here:

def_init_externals():

Since the loop only has one item this PR convert refactors it to use the standardimport.

Why

Some tooling only works with modules to be imported viaimport as the packages names are resolve-able without executing code, which__import__ prevents.

Possible Changes

If it is desired to havesmmap added intoglobals() of__init__.py; I can remove thedel smmap line. Right now it is there because__import__, whichimport is replacing, doesnot addsmmap toglobals()

@Byron
Copy link
Member

Thanks a lot, this change is much appreciated. It's clear that this kind of__import__ logic isn't very useful here anymore, after all it's just a single module to import.

zwimer reacted with thumbs up emoji

@ByronByron merged commit43de984 intogitpython-developers:masterNov 23, 2022
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers
No reviews
Assignees
No one assigned
Labels
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

2 participants
@zwimer@Byron

[8]ページ先頭

©2009-2025 Movatter.jp