Skip to content
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: warning about __main__ already being imported #884

Merged
merged 1 commit into from
Nov 5, 2024

Conversation

henryiii
Copy link
Collaborator

@henryiii henryiii commented Nov 5, 2024

Follow up to #878, fixing a warning about __main__ already being imported when running __main__ (I think it messes with the if __name__ == "__main__" statement when you use python -m nox and that imports __init__ and that triggers the __main__ import early).

Fixed by moving __main__.py contents to _cli.py then importing from there for __init__.py and __main__.py. Backward compatible.

Noticed in #881.

Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com>
@henryiii henryiii force-pushed the henryiii/fix/mainwarning branch from 446b310 to 8fa3251 Compare November 5, 2024 04:29
@henryiii henryiii mentioned this pull request Nov 5, 2024
@henryiii henryiii merged commit f4a91df into wntrblm:main Nov 5, 2024
24 checks passed
@henryiii henryiii deleted the henryiii/fix/mainwarning branch November 5, 2024 13:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants