Skip to content

style: Fix typos in Python and TeX files and enable codespell for them - #8053

Merged
echoix merged 7 commits into
OSGeo:mainfrom
echoix:codespell-python-tex-typos
Oct 16, 2026
Merged

echoix merged 7 commits into
OSGeo:mainfrom
echoix:codespell-python-tex-typos

Conversation

@echoix

@echoix echoix commented Oct 11, 2026

Copy link
Copy Markdown
Member

Description

Fix the typos codespell reports in Python and TeX files, and enable codespell for those file types in pre-commit.

  • Remaining false positives (identifiers, test fixtures) are added to the ignore list or marked inline; vendored PLY and ctypesgen code is skipped.
  • No translatable (_()) strings are changed, and the public create_time_suffix(mapp, ...) signature is kept.

Motivation and context

Typos in Python and TeX files were not caught by pre-commit.

How has this been tested?

pre-commit run --all-files passes for codespell, ruff and flake8.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as before)

Checklist

  • PR title provides summary of the changes and starts with one of the pre-defined prefixes
  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have added tests to cover my changes.

The typo fixes were prepared with an AI coding assistant.

Claude added 5 commits October 11, 2026 08:12
Fix typos in comments and docstrings and rename misspelled local variables,
attributes and parameters.
Fix misspelled words in comments, docstrings, error messages and test
code, and rename misspelled local variables. Abbreviated option names
and deliberate fixtures are marked for codespell instead of changed.
Remove the Python and TeX types from the codespell exclusions in
pre-commit, add the legitimate identifiers and words that codespell
flags to the ignore list, and skip the vendored PLY and ctypesgen code.

Typo fixes in the rest of this branch were prepared with an AI coding
assistant.
- goodness.tex: Use "In this implementation", matching the
  surrounding text.
- grass.temporal: Keep the mapp parameter name of the public
  create_time_suffix() so keyword callers keep working, and add it to
  the codespell ignore list. The value is a map dataset object, so
  map_name was also misleading.
- r.grow test: Rename the variables of test_shrink_null consistently,
  which also removes the shrined typo.
- v.report: Name the flag has_table, since it tells whether the layer
  has an attribute table linked.
- g.md2man, g.html2man: Use a lowercase word in the codespell:ignore
  comments. Codespell only matches lowercase words there, and the
  "ignore:" form silenced the whole line.
- Fix adjacent typos left in the edited lines ("an many", "is stayed")
  and use names that pair with their counterparts (denominator,
  name_template).
fobj = open(fXML)
try:
tree = ET.fromstring(fo.read())
tree = ET.fromstring(fobj.read())

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.

Not useful here, the same code as before is there.

@github-actions github-actions Bot added GUI wxGUI related CI Continuous integration vector Related to vector data processing raster Related to raster data processing Python Related code is in Python database Related to database management libraries module docs general imagery tests Related to Test Suite labels Oct 11, 2026
"point_width",
]
for settKey in settsOrder:
sett = setts[settKey]

@petrasovaa petrasovaa Oct 14, 2026 •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

sett is not used, the whole thing can be removed, also in iscatt/dialogs.py

Claude and others added 2 commits October 14, 2026 11:17
The sett variable read in the point and selection style layout loops
was never used, so drop it together with the merged settings dict it
was read from.
fobj = open(fXML)
try:
tree = ET.fromstring(fo.read())
tree = ET.fromstring(fobj.read())

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.

Preexistant

@echoix
echoix merged commit cbb8ab2 into OSGeo:main Oct 16, 2026
27 checks passed
@github-actions github-actions Bot added this to the 8.6.0 milestone Oct 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CI Continuous integration database Related to database management docs general GUI wxGUI related imagery libraries module Python Related code is in Python raster Related to raster data processing tests Related to Test Suite vector Related to vector data processing

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants