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

Allow matplotlib.use calls to intersperse imports #9094

Merged
merged 1 commit into from
Dec 11, 2023

Conversation

charliermarsh
Copy link
Member

@charliermarsh charliermarsh commented Dec 11, 2023

This PR allows matplotlib.use calls to intersperse imports without triggering E402. This is a pragmatic choice as it's common to require matplotlib.use calls prior to importing from within matplotlib itself.

Closes #9091.

Copy link
Member

@konstin konstin left a comment

Choose a reason for hiding this comment

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

Sounds like the right solution to me

Copy link
Contributor

github-actions bot commented Dec 11, 2023

ruff-ecosystem results

Linter (stable)

✅ ecosystem check detected no linter changes.

Linter (preview)

✅ ecosystem check detected no linter changes.

@charliermarsh charliermarsh marked this pull request as ready for review December 11, 2023 17:01
@charliermarsh charliermarsh added the rule Implementing or modifying a lint rule label Dec 11, 2023
@charliermarsh charliermarsh enabled auto-merge (squash) December 11, 2023 17:01
@charliermarsh charliermarsh merged commit f452bf8 into main Dec 11, 2023
16 checks passed
@charliermarsh charliermarsh deleted the charlie/matplotlib branch December 11, 2023 17:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
rule Implementing or modifying a lint rule
Projects
None yet
Development

Successfully merging this pull request may close these issues.

How to make peace with needed nested import statements for Ruff E402?
2 participants