Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Checks: fix flake8 E741 remainder #3928

Merged
merged 8 commits into from
Jul 2, 2024
Merged

Conversation

mshukuno
Copy link
Contributor

Reminder of E741 fixes for the "locale", "python", and "scripts" directories. The majority of fixes involved renaming variable names in iterables. The "noqa: E741" was added to "scripts/d.rast.leg/d.rast.leg.py" since it didn't make sense to change just the "l".

@github-actions github-actions bot added raster Related to raster data processing Python Related code is in Python translation Message translation related database Related to database management libraries module display labels Jun 25, 2024
Copy link
Member

@echoix echoix left a comment

Choose a reason for hiding this comment

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

I have two questions in two files, all the others are fine as is with me.

python/grass/pygrass/raster/rowio.py Show resolved Hide resolved
scripts/db.univar/db.univar.py Outdated Show resolved Hide resolved
@echoix echoix added this to the 8.5.0 milestone Jun 30, 2024
@echoix echoix merged commit 1a8cbec into OSGeo:main Jul 2, 2024
24 checks passed
@mshukuno mshukuno deleted the flake8-E741-remainder branch July 19, 2024 15:36
Copy link
Member

@echoix echoix left a comment

Choose a reason for hiding this comment

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

There seems to be a regression possibly caused by a change in the number of arguments in the getmaprow functions in this PR, see #3928 (comment)

python/grass/pygrass/raster/rowio.py Show resolved Hide resolved
@mshukuno
Copy link
Contributor Author

The "l" parameter should be reinserted? If so

  • My lack of C language experience leads me to have trouble finding the name of the "l" parameter. Can you help me with renaming "l"?
  • Can I directory PR for this or should I address the issue and then PR?

a0x8o pushed a commit to a0x8o/grass that referenced this pull request Jul 23, 2024
* Rename l to line when using `f.readlines()`.

* Remove "l"s from parameters since they aren't used.

* Rename "l" to "lx" to assign a lexer object.

* Add "# noqa: E741" as renaming parameters won't be applicable in this case.

* Rename "l" to "ln" as line number.

* Rename "l" to "layer" when looping through the layer list.

* Remove E741 for files in the 'locale', `python`, and `scripts` directory.

* Rename "ln" to "line_number".
@neteler
Copy link
Member

neteler commented Jul 23, 2024

Does @nilason have a ctypes related hint here? (if it applies)

@echoix
Copy link
Member

echoix commented Jul 23, 2024

If we make a draft PR re-adding the same numbers of parameters, we'll see right away if there is the same error.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
database Related to database management display libraries module Python Related code is in Python raster Related to raster data processing translation Message translation related
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants