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

Enforce names for singleton imports #8639

Merged
merged 1 commit into from
Feb 27, 2025
Merged

Enforce names for singleton imports #8639

merged 1 commit into from
Feb 27, 2025

Conversation

larkox
Copy link
Contributor

@larkox larkox commented Feb 27, 2025

Summary

The singletons we use, when we try to import them, the IDE automatically set the file name, instead of the name of the class (e.g. test_helper vs. TestHelper.

This is due to the variable returned in the default not having a name. This is solved by changing the name of the class, and storing the new object in a constant before exporting it.

Ticket Link

NONE

Release Note

NONE

@larkox larkox requested review from enahum and a team February 27, 2025 10:18
Copy link
Contributor

@enahum enahum left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Interesting.. I like it

Copy link
Contributor

@Rajat-Dabade Rajat-Dabade left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome work 🚀

@larkox larkox added the 4: Reviews Complete All reviewers have approved the pull request label Feb 27, 2025
@larkox larkox merged commit 802a67c into main Feb 27, 2025
32 checks passed
@larkox larkox deleted the fixSingletonImports branch February 27, 2025 11:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
4: Reviews Complete All reviewers have approved the pull request release-note-none
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants