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 in gui/wxpython directory #3926

Merged
merged 10 commits into from
Jun 29, 2024

Conversation

mshukuno
Copy link
Contributor

The E741 "ambiguous variable name 'l'" is fixed in the gui/wxpython directory. Many of the fixes involved renaming "l" in iterables.

One thing I would like to point out is that 01eb8dd returns its self value. Personally, I don't see a problem with changing the name, but I thought it would be best to consult with a developer who is familiar with GRASS GUIs.

@github-actions github-actions bot added GUI wxGUI related Python Related code is in Python labels Jun 25, 2024
@neteler neteler added this to the 8.5.0 milestone Jun 25, 2024
@echoix
Copy link
Member

echoix commented Jun 25, 2024

I've reviewed everything, it's correct, but I'm not completely sure I understand the old code from gui/wxpython/iclass/dialogs.py and gui/wxpython/iscatt/frame.py. As such, I'm not completely sure of the new name chosen. But the form is correct even in these two files.

Can someone jump in for this?

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've read about wx.ItemAttr() and the changes done for it makes sense.

That means changes for all of the files are fine with me.

Thanks a lot!

@echoix echoix merged commit b5bfcd5 into OSGeo:main Jun 29, 2024
24 checks passed
cyliang368 pushed a commit to cyliang368/grass that referenced this pull request Jul 1, 2024
* Rename self.l to self.item_attr when using self.l as an argument to wx.ItemAttr().

* Rename l to layer when using l for loop through layer list.

* Rename l to new_layer_lst when using l as an argument to self._tree.AddLayer().

* Rename l to rli_conf when looping through the configuration files in self.rlipath.

* Rename l to layer when looping through the self.map_.GetListOfLayers().

* Rename l to dataset_info when sorting `allDatasets` with the lambda function.

* Rename l to layer_num when looping through `catsDict.items()`.

* Rename l to layer when retrieving layer information in a function.

* Rename l to curr when looping through the `curr_sel_ls`.

* Remove E741 for files in gui/wxpython directory.
@a0x8o a0x8o mentioned this pull request Jul 1, 2024
a0x8o pushed a commit to a0x8o/grass that referenced this pull request Jul 2, 2024
* Rename self.l to self.item_attr when using self.l as an argument to wx.ItemAttr().

* Rename l to layer when using l for loop through layer list.

* Rename l to new_layer_lst when using l as an argument to self._tree.AddLayer().

* Rename l to rli_conf when looping through the configuration files in self.rlipath.

* Rename l to layer when looping through the self.map_.GetListOfLayers().

* Rename l to dataset_info when sorting `allDatasets` with the lambda function.

* Rename l to layer_num when looping through `catsDict.items()`.

* Rename l to layer when retrieving layer information in a function.

* Rename l to curr when looping through the `curr_sel_ls`.

* Remove E741 for files in gui/wxpython directory.
@mshukuno mshukuno deleted the flake8-E741-wxpython branch July 19, 2024 15:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
GUI wxGUI related Python Related code is in Python
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants