Skip to content

codespell: Avoid project-level ignore words if possible#4691

Merged
seisman merged 1 commit into
mainfrom
codespell/ignore
Jun 24, 2026
Merged

codespell: Avoid project-level ignore words if possible#4691
seisman merged 1 commit into
mainfrom
codespell/ignore

Conversation

@seisman

@seisman seisman commented Jun 21, 2026

Copy link
Copy Markdown
Member

This PR tries to shorten the project-level ignore words list for codespell.

@seisman seisman added this to the 0.19.0 milestone Jun 21, 2026
@seisman seisman added maintenance Boring but important stuff for the core devs skip-changelog Skip adding Pull Request to changelog needs review This PR has higher priority and needs review. labels Jun 21, 2026
Comment thread pygmt/enums.py
NI = 17 #: GMT netCDF format (32-bit integer)
NF = 18 #: GMT netCDF format (32-bit float)
ND = 19 #: GMT netCDF format (64-bit float)
ND = 19 #: GMT netCDF format (64-bit float) # codespell:ignore

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.

The codespell syntax for inline igore (xref: https://github.com/codespell-project/codespell#inline-ignore).

Comment thread pygmt/datatypes/header.py
GridFormat.NI,
GridFormat.NF,
GridFormat.ND,
GridFormat.ND, # codespell:ignore

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.

The codespell syntax for inline igore (xref: https://github.com/codespell-project/codespell#inline-ignore).


fig.colorbar(
cmap="SCM/buda",
cmap="SCM/hawaii",

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.

Any CPT can be used in this file. Choose SCM/hawaii so that codespell doesn't report buda.

**M**\ (iles), or **n**\ (autical miles) [Default is (m)\ **e**\ (ters)].
- For projected data (**X**\|\ **Y**\|\ **D**), the unit may be
**i**\ (nches), **c**\ (entimeters), or **p**\ (oints).
**i** (inches), **c** (centimeters), or **p** (points).

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.

We will likely get more false positives if we keep using the syntax like **i**\ (nches). I think we should try our best to avoid using it in the future.

Comment thread pyproject.toml

[tool.codespell]
ignore-words-list = "astroid,buda,oints,reenable,te,tripel,trough,ND"
ignore-words-list = "astroid,te,tripel,trough"

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.

We can't use the inline ignore syntax (# codespell:ignore) for these words because they are used in the documentation. Otherwise, the ignore comments would appear in the code examples shown in the docs.

@seisman seisman merged commit 2dc9644 into main Jun 24, 2026
27 of 28 checks passed
@seisman seisman deleted the codespell/ignore branch June 24, 2026 00:42
@seisman seisman removed the needs review This PR has higher priority and needs review. label Jun 24, 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