Skip to content

Allow matplotlib.use calls to intersperse imports#9094

Merged
charliermarsh merged 1 commit intomainfrom
charlie/matplotlib
Dec 11, 2023
Merged

Allow matplotlib.use calls to intersperse imports#9094
charliermarsh merged 1 commit intomainfrom
charlie/matplotlib

Conversation

@charliermarsh
Copy link
Copy Markdown
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
Copy Markdown
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

@github-actions
Copy link
Copy Markdown
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
@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