Skip to content

ref(py): Consistently use import * in models #89444

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

Merged

Conversation

evanpurkhiser
Copy link
Member

@evanpurkhiser evanpurkhiser commented Apr 11, 2025

I know we're trying to just straight remove these, but let's at least be
consistent for now so that mypy understands that these models are
available from this module.

Needed for this simplification #89440

I know we're trying to just straight remove these, but let's at least be
consistent for now so that mypy understands that these models are
available from this module.
@evanpurkhiser evanpurkhiser requested a review from a team April 11, 2025 22:29
@github-actions github-actions bot added the Scope: Backend Automatically applied to PRs that change backend components label Apr 11, 2025
@@ -104,8 +104,8 @@
from .rollbackorganization import * # NOQA
from .rollbackuser import * # NOQA
from .rule import * # NOQA
from .rulefirehistory import RuleFireHistory # NOQA
from .rulesnooze import RuleSnooze # NOQA
from .rulefirehistory import * # NOQA
Copy link
Member

@mjq mjq Apr 14, 2025

Choose a reason for hiding this comment

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

Even though rulefirehistory only contains RuleFireHistory, would it still make sense to add an explicit __all__ to avoid inadvertently importing something later via this pattern?

Copy link
Member Author

Choose a reason for hiding this comment

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

yeah let me follow up there

@evanpurkhiser evanpurkhiser merged commit 62075a9 into master Apr 14, 2025
62 checks passed
@evanpurkhiser evanpurkhiser deleted the evanpurkhiser/ref-py-consistently-use-import-in-models branch April 14, 2025 15:41
billyvg pushed a commit that referenced this pull request Apr 14, 2025
I know we're trying to just straight remove these, but let's at least be
consistent for now so that mypy understands that these models are
available from this module.

Needed for this simplification
#89440
andrewshie-sentry pushed a commit that referenced this pull request Apr 22, 2025
I know we're trying to just straight remove these, but let's at least be
consistent for now so that mypy understands that these models are
available from this module.

Needed for this simplification
#89440
@github-actions github-actions bot locked and limited conversation to collaborators Apr 30, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Scope: Backend Automatically applied to PRs that change backend components
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants