CodeQL documentation

Wrong name for an argument in a call

ID: py/call/wrong-named-argument
Kind: problem
Security severity: 
Severity: error
Precision: very-high
Tags:
   - quality
   - reliability
   - correctness
   - external/cwe/cwe-628
Query suites:
   - python-security-and-quality.qls

Click to see the query in the CodeQL repository

Using a named argument whose name does not correspond to a parameter of the called function (or method), will result in a TypeError at runtime.

Recommendation

Check for typos in the name of the arguments and fix those. If the name is clearly different, then this suggests a logical error. The change required to correct the error will depend on whether the wrong argument has been specified or whether the wrong function (or method) has been specified.

References

  • © GitHub, Inc.
  • Terms
  • Privacy
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy