FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Clean up mypy & ruff config by QuLogic · Pull Request #30258 · matplotlib/matplotlib · GitHub

Repository navigation

Clean up mypy & ruff config - #30258

Merged
timhoffm merged 4 commits into
matplotlib:mainfrom
QuLogic:ruff-update
Jul 5, 2025
Merged

timhoffm merged 4 commits into
matplotlib:mainfrom
QuLogic:ruff-update

Conversation

QuLogic commented Jul 4, 2025

Copy link
Copy Markdown
Member

PR summary

Drop outdated options, and exceptions that are no longer needed because the files were fixed. Also, fix a few simpler cases so that more exceptions can be dropped.

PR checklist

github-actions Bot added GUI: webagg Documentation: examples files in galleries/examples Documentation: tutorials files in galleries/tutorials labels Jul 4, 2025
HourLocator, MicrosecondLocator, MinuteLocator,
MonthLocator, RRuleLocator, SecondLocator,
WeekdayLocator, YearLocator, rrulewrapper)
from matplotlib.dates import DateFormatter

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

It seems that while these aren't referenced in the code directly, they are referenced from strings that get evaled:

        Traceback (most recent call last):
          File "/home/circleci/project/galleries/examples/ticks/date_formatters_locators.py", line 58, in <module>
            plot_axis(ax, locator, xmax, fmt)
          File "/home/circleci/project/galleries/examples/ticks/date_formatters_locators.py", line 27, in plot_axis
            ax.xaxis.set_major_locator(eval(locator))
                                       ^^^^^^^^^^^^^
          File "<string>", line 1, in <module>
        NameError: name 'AutoDateLocator' is not defined

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Indeed, I'll add a comment to make that more obvious.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Sigh, isort wants to remove the noqa, while ruff/flake8 wants it. I'll just restore the exception then.

QuLogic added 3 commits July 4, 2025 14:46
ruff uses `project.requires-python`, so the ruff-only `target-version`
is not needed.

Other exceptions can be dropped since they are all clear of warnings.
The removed excludes are covered by the first line. The Unpack feature
was enabled by default in 1.9, which is our minimum.
QuLogic force-pushed the ruff-update branch 2 times, most recently from cf7c0d5 to 77deb26 Compare July 4, 2025 18:50
These examples only needed a single fix to remove the exception.
timhoffm merged commit faa3670 into matplotlib:main Jul 5, 2025
QuLogic deleted the ruff-update branch July 6, 2025 00:31
QuLogic added this to the v3.11.0 milestone Jul 6, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Documentation: examples files in galleries/examples Documentation: tutorials files in galleries/tutorials GUI: webagg

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants


Back | FazBrowse Home | New Git URL