CodeQL documentation

Use of an undefined placeholder variable

ID: py/undefined-placeholder-variable
Kind: problem
Security severity: 
Severity: error
Precision: medium
Tags:
   - reliability
   - correctness
Query suites:
   - python-security-and-quality.qls

Click to see the query in the CodeQL repository

This place-holder variable may not be defined. If this code is executed and the variable is undefined then a NameError will occur.

Recommendation

Check that the name of the place-holder variable is not a typographic error. If the name is correct, either define a value for the variable, or import the module that defines the function or method that sets the value.

If another module initializes this variable before it is used, then the NameError may not occur. However, you can make the code more robust and clearer by setting the variable to a default value in its own module.

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