Skip to content

gui(vnet): Fix for Wrong name for an argument in a call#7392

Open
echoix wants to merge 1 commit into
OSGeo:mainfrom
echoix-org:finding-autofix-2184cc03
Open

gui(vnet): Fix for Wrong name for an argument in a call#7392
echoix wants to merge 1 commit into
OSGeo:mainfrom
echoix-org:finding-autofix-2184cc03

Conversation

@echoix
Copy link
Copy Markdown
Member

@echoix echoix commented May 15, 2026

My description: typo where the closing parentheses of int() spanned two arguments instead of only wrapping one.

Generated AI PR text in my fork was:

The fix is to correct the keyword arguments in the GetNearestNodeCat call so they match that function’s expected parameter names, while preserving behavior.

Best fix in this snippet:

  • In gui/wxpython/vnet/vnet_core.py, inside _runTurnsAn, replace the malformed call:
    • remove field=... (unsupported),
    • remove tresh=... from inside int(...) (invalid),
    • pass layer=int(params["turn_cat_layer"]) and tresh=params["max_dist"] directly to GetNearestNodeCat.
  • Keep existing logic intact otherwise.

No new imports, methods, or dependencies are needed.

Suggested fixes powered by Copilot Autofix. Review carefully before merging.

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
@github-actions github-actions Bot added GUI wxGUI related Python Related code is in Python labels May 15, 2026
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.

1 participant