Skip to content

Flake8 fixes#228

Merged
dvdkon merged 4 commits intoMerginMaps:masterfrom
BritishGeologicalSurvey:flake8-fixes
Oct 30, 2025
Merged

Flake8 fixes#228
dvdkon merged 4 commits intoMerginMaps:masterfrom
BritishGeologicalSurvey:flake8-fixes

Conversation

@volcan01010
Copy link
Contributor

Description

This merge request makes a number of mainly cosmetic changes to the pygeodiff directory to fix errors and warnings raised by the flake8 linting software. This removes ugly warning underlines in IDEs that report on flake8.

The fixes are:

  • Fix module import related errors by explicitly defining __all__ and replacing import * syntax.
  • Fix line length errors by adding .flake8 config with max-line-length of 100, shortening some lines and using # noqa where they can't be shortened.
  • Fix invalid escape sequence errors in docstrings by using reST format parameter definitions e.g. :param input_file:.

To test

The result of the fixes can be seen by running flake8 pygeodiff in the project root directory in both the main and flake8-fixes branches.

The remaining errors in the flake8-fixes branch are not cosmetic, so have been left.

$ flake8 pygeodiff
pygeodiff/tests/test_skip_tables.py:22:9: F841 local variable 'modified_points' is assigned to but never used
pygeodiff/tests/test_skip_tables.py:65:9: F841 local variable 'modified_points' is assigned to but never used
pygeodiff/tests/testutils.py:69:5: E722 do not use bare 'except'
pygeodiff/tests/testutils.py:139:20: F821 undefined name 'find_diff'

Defining __all__ also fixes flake8 unused import errors.
This fixes the flake8 errors caused by "import *" syntax.
Replacing \param with :param fixes flake8 warnings caused by \p being
treated as an escape sequence.
@dvdkon
Copy link
Contributor

dvdkon commented Oct 30, 2025

Looks good to me, thanks!

@dvdkon dvdkon merged commit c135642 into MerginMaps:master Oct 30, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants