Module implementing a checker for unused arguments, variables, ... .
GlobalVariableStoreInfo |
FunctionFinder | Class to find all defined functions and methods. |
GlobalVariableLoadCounter | Class to find all defined global variables and count their usages. |
NameFinder | Class to find the used argument names. |
UnusedChecker | Class implementing a checker for unused arguments, variables, ... |
None |
Class to find all defined functions and methods.
visit_AsyncFunctionDef |
None |
FunctionFinder | Constructor |
__visitFunctionTypes | Private method to handle an AST node defining a function or lambda. |
functionNodes | Public method to get the list of detected functions and lambdas. |
None |
Constructor
Private method to handle an AST node defining a function or lambda.
Public method to get the list of detected functions and lambdas.
Class to find all defined global variables and count their usages.
None |
None |
GlobalVariableLoadCounter | Constructor |
getLoads | Public method to get an iterator of the detected variable loads. |
getStoreInfo | Public method to get the store info data of a given variable ID. |
visit_Name | Public method to record the definition and use of a global variable. |
None |
Constructor
Public method to get an iterator of the detected variable loads.
Public method to get the store info data of a given variable ID.
Public method to record the definition and use of a global variable.
Class to find the used argument names.
None |
None |
visit_Name | Public method to check a Name node. |
None |
Public method to check a Name node.
Class implementing a checker for unused arguments, variables, ... .
Codes |
None |
UnusedChecker | Constructor |
__checkUnusedArguments | Private method to check function and method definitions for unused arguments. |
__checkUnusedGlobals | Private method to check for unused global variables. |
__error | Private method to record an issue. |
__extractGlobalVariables | Private method to get the names of all global variables. |
__getArguments | Private method to get all argument names of the given function. |
__getDecoratorNames | Private method to yield the decorator names of the function. |
__getUnusedArguments | Private method to get a list of unused arguments of the given function. |
__ignoreCode | Private method to check if the message code should be ignored. |
__isDunderMethod | Private method to check, if the function node defines a special function. |
__isEventHandlerMethod | Private method to check, if the function node defines a Qt event handler. |
__isStubFunction | Private method to check, if the given function node defines a stub function. |
run | Public method to check the given source against miscellaneous conditions. |
None |
Constructor
Private method to check function and method definitions for unused arguments.
Private method to check for unused global variables.
Private method to record an issue.
Private method to get the names of all global variables.
Private method to get all argument names of the given function.
Private method to yield the decorator names of the function.
Private method to get a list of unused arguments of the given function.
Private method to check if the message code should be ignored.
Private method to check, if the function node defines a special function.
Private method to check, if the function node defines a Qt event handler.
Qt event handler methods are assumed to end with 'Event' or have the name 'event' or 'eventFilter'. Only standard methodes (i.e. ast.FunctionDef) are assumed to be potential event handlers.
Private method to check, if the given function node defines a stub function.
Public method to check the given source against miscellaneous conditions.