Skip to content

Bump ruff to 0.15.5 and ignore a violation#4445

Merged
seisman merged 1 commit intomainfrom
ruff/0.15.5
Mar 7, 2026
Merged

Bump ruff to 0.15.5 and ignore a violation#4445
seisman merged 1 commit intomainfrom
ruff/0.15.5

Conversation

@seisman
Copy link
Member

@seisman seisman commented Mar 7, 2026

ruff v0.15.0 finds a new violation:

ruff check pygmt doc/conf.py examples
PERF102 When using only the values of a dict use the `values()` method
    --> pygmt/clib/session.py:1921:52
     |
1919 |                     # Dictionary, pandas.DataFrame or xarray.Dataset types.
1920 |                     # pandas.Series will be handled below like a 1-D numpy.ndarray.
1921 |                     _data = [array for _, array in data.items()]
     |                                                    ^^^^^^^^^^
1922 |                 else:
1923 |                     # Python list, tuple, numpy.ndarray, and pandas.Series types
     |
help: Replace `.items()` with `.values()`

but here, data can be a dict, panda.DataFrame or xarray.Dataset, so we can't change it to data.values().

This PR ignores the violation and bumps ruff to v0.15.0

@seisman seisman added this to the 0.19.0 milestone Mar 7, 2026
@seisman seisman added maintenance Boring but important stuff for the core devs skip-changelog Skip adding Pull Request to changelog final review call This PR requires final review and approval from a second reviewer labels Mar 7, 2026
@seisman seisman removed the final review call This PR requires final review and approval from a second reviewer label Mar 7, 2026
@seisman seisman merged commit 2541547 into main Mar 7, 2026
25 of 27 checks passed
@seisman seisman deleted the ruff/0.15.5 branch March 7, 2026 06:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

maintenance Boring but important stuff for the core devs skip-changelog Skip adding Pull Request to changelog

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants