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

wxGUI/datacatalog: Replace lambda expression with named Function to fix E731 #4377

Merged
merged 3 commits into from
Sep 25, 2024
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .flake8
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ per-file-ignores =
doc/python/m.distance.py: E501
doc/gui/wxpython/example/dialogs.py: F401
gui/scripts/d.wms.py: E501
gui/wxpython/datacatalog/tree.py: E731, E402
gui/wxpython/dbmgr/base.py: E722
gui/wxpython/dbmgr/dialogs.py: E722
gui/wxpython/dbmgr/sqlbuilder.py: E722
Expand Down
24 changes: 15 additions & 9 deletions gui/wxpython/datacatalog/tree.py
Original file line number Diff line number Diff line change
Expand Up @@ -1378,15 +1378,21 @@ def OnPasteMap(self, event):
)
if not new_name:
continue
callback = lambda gisrc2=gisrc2, gisrc=gisrc, cLayer=self.copy_layer[
i
], cMapset=self.copy_mapset[
i
], cMode=self.copy_mode, sMapset=self.selected_mapset[
0
], name=new_name: self._onDoneReprojection(
env2, gisrc2, gisrc, cLayer, cMapset, cMode, sMapset, name
)

def _callback(
gisrc2=gisrc2,
gisrc=gisrc,
cLayer=self.copy_layer[i],
cMapset=self.copy_mapset[i],
cMode=self.copy_mode,
sMapset=self.selected_mapset[0],
name=new_name,
):
self._onDoneReprojection(
env2, gisrc2, gisrc, cLayer, cMapset, cMode, sMapset, name
)

callback = _callback
arohanajit marked this conversation as resolved.
Show resolved Hide resolved
dlg = CatalogReprojectionDialog(
self,
self._giface,
Expand Down
Loading