Skip to content

Commit

Permalink
wxGUI/datacatalog: Replace lambda expression with named Function to f…
Browse files Browse the repository at this point in the history
…ix E731 (OSGeo#4377)
  • Loading branch information
arohanajit authored Sep 25, 2024
1 parent 8261363 commit 7c651c3
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 10 deletions.
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
23 changes: 14 additions & 9 deletions gui/wxpython/datacatalog/tree.py
Original file line number Diff line number Diff line change
Expand Up @@ -1378,15 +1378,20 @@ 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
)

dlg = CatalogReprojectionDialog(
self,
self._giface,
Expand Down

0 comments on commit 7c651c3

Please sign in to comment.