Visitar URL original
ruff: Fix ICN002 geopandas import alias by seisman · Pull Request #4430 · GenericMappingTools/pygmt · GitHub
Skip to content

ruff: Fix ICN002 geopandas import alias - #4430

Merged
seisman merged 1 commit into
mainfrom
icn002-no-geopandas-gpd
Feb 27, 2026
Merged

seisman merged 1 commit into
mainfrom
icn002-no-geopandas-gpd

Conversation

@seisman

@seisman seisman commented Feb 27, 2026

Copy link
Copy Markdown
Member

ruff v0.15.3 starts to report the following error:

ruff check pygmt doc/conf.py examples
ICN002 `geopandas` should not be imported as `gpd`
  --> examples/gallery/lines/linestrings.py:15:1
   |
14 | # %%
15 | import geopandas as gpd
   | ^^^^^^^^^^^^^^^^^^^^^^^
16 | import pygmt
   |

ICN002 `geopandas` should not be imported as `gpd`

which was introduded in astral-sh/ruff#21373.

It seems the GeoPandas site also uses import geopandas rather than import geopandas as gpd (xref: https://geopandas.org/en/stable/getting_started/introduction.html).

This PR fixes the issue.

@seisman seisman added this to the 0.19.0 milestone Feb 27, 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 Feb 27, 2026
@seisman
seisman merged commit bf94645 into main Feb 27, 2026
25 of 30 checks passed
@seisman
seisman deleted the icn002-no-geopandas-gpd branch February 27, 2026 12:08
@seisman seisman removed the final review call This PR requires final review and approval from a second reviewer label Feb 27, 2026
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