Classes checker for Python code.
Class |
|
Checker for class nodes. |
Class |
|
Store the accessed variables per scope. |
Constant | ASTROID |
Undocumented |
Constant | BUILTIN |
Undocumented |
Constant | INVALID |
Undocumented |
Constant | MSGS |
Undocumented |
Class | _ |
Sentinel value for missing arg default, use _DEFAULT_MISSING. |
Function | _ancestors |
Return a dictionary where keys are the list of base classes providing the queried method, and so that should/may be called from the method node. |
Function | _called |
Check if the func was called in any of the given methods, belonging to the *klass*. |
Function | _definition |
Check if a definition signature is equivalent to a call. |
Function | _different |
Determine if the two methods have different parameters. |
Function | _has |
Undocumented |
Function | _has |
Determine if the two methods have different keyword only parameters. |
Function | _has |
Undocumented |
Function | _has |
Check if original and overridden methods arguments have different default values. |
Function | _has |
Undocumented |
Function | _is |
Check if the given attribute *name* is a property in the given *klass*. |
Function | _is |
Undocumented |
Function | _is |
Check whether a function definition is a method consisting only of a call to the same function on the superclass. |
Function | _positional |
Undocumented |
Function | _scope |
Undocumented |
Function | _signature |
Undocumented |
Function | _signature |
Undocumented |
Constant | _DEFAULT |
Undocumented |
Type Alias | _ |
Undocumented |
Variable | _ |
Undocumented |
Variable | _ |
Undocumented |
Undocumented
Value |
|
Undocumented
Value |
|
nodes.ClassDef
, method_name: str
= '__init__') -> dict[ nodes.ClassDef, bases.UnboundMethod]
:
(source)
¶
Return a dictionary where keys are the list of base classes providing the queried method, and so that should/may be called from the method node.
LocalsDictNodeNG
, klass: nodes.ClassDef
, methods: Sequence[ str]
) -> bool
:
(source)
¶
Check if the func was called in any of the given methods, belonging to the *klass*. Returns True if so, False otherwise.
_ParameterSignature
, call: _CallSignature
) -> bool
:
(source)
¶
Check if a definition signature is equivalent to a call.
nodes.FunctionDef
, overridden: nodes.FunctionDef
, dummy_parameter_regex: Pattern[ str]
) -> list[ str]
:
(source)
¶
Determine if the two methods have different parameters. They are considered to have different parameters if: * they have different positional parameters, including different names * one of the methods is having variadics, while the other is not * they have different keyword only parameters.
list[ nodes.AssignName]
, overridden: list[ nodes.AssignName]
) -> list[ str]
:
(source)
¶
Determine if the two methods have different keyword only parameters.
list[ nodes.AssignName]
, overridden: list[ nodes.AssignName]
, dummy_parameter_regex: Pattern[ str]
) -> list[ str]
:
(source)
¶
Undocumented
nodes.Arguments
, overridden: nodes.Arguments
) -> bool
:
(source)
¶
Check if original and overridden methods arguments have different default values. Return True if one of the overridden arguments has a default value different from the default value of the original argument If one of the method doesn't have argument (.args is None) return False
list[ nodes.Const|None]
, assigned_value: nodes.Name
) -> bool
:
(source)
¶
Undocumented
Check if the given attribute *name* is a property in the given *klass*. It will look for `property` calls or for functions with the given name, decorated by `property` or `property` subclasses. Returns ``True`` if the name is a property in the given klass, ``False`` otherwise.
Check whether a function definition is a method consisting only of a call to the same function on the superclass.