Skip to content

grass.pygrass.vector: Fix for Wrong number of arguments in a call to update_odict - #7394

Merged
echoix merged 1 commit into
OSGeo:mainfrom
echoix-org:finding-autofix-8e0634e2
May 18, 2026
Merged

echoix merged 1 commit into
OSGeo:mainfrom
echoix-org:finding-autofix-8e0634e2

Conversation

@echoix

@echoix echoix commented May 15, 2026

Copy link
Copy Markdown
Member

If you look at all the usages of the update_odict function, there is only one place where it is called with arguments. All other places are without arguments. Adding self here is wrong.

Removing the extra self.


The fix is to call update_odict with the correct arity, consistent with its other usage in the same class.

Best fix (no functional change): in python/grass/pygrass/vector/table.py, within Columns.__setitem__, replace:

  • self.update_odict(self)
    with:
  • self.update_odict()

No new imports, helper methods, or definitions 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 Python Related code is in Python libraries labels May 15, 2026
@echoix
echoix requested review from pesekon2 and petrasovaa May 18, 2026 10:45
@echoix
echoix merged commit 986bb1d into OSGeo:main May 18, 2026
28 of 31 checks passed
@github-actions github-actions Bot added this to the 8.6.0 milestone May 18, 2026
@echoix
echoix deleted the finding-autofix-8e0634e2 branch May 20, 2026 11:52
ninsbl pushed a commit to ninsbl/grass that referenced this pull request Jul 7, 2026
…update_odict (OSGeo#7394)

Fix for Wrong number of arguments in a call

If you look at all the usages of the update_odict function, there is only one place where it is called with arguments. All other places are without arguments. Adding `self` here is wrong.

Removing the extra `self`.



Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

libraries Python Related code is in Python

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants