-
-
Notifications
You must be signed in to change notification settings - Fork 308
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
Conversation
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? |
There was a problem hiding this 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!
* 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.
* 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.
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.