Try to find more bugs in the code using astroid inference capabilities.
Class |
|
Checks for non-iterables used in an iterable context. |
Class |
|
Try to find bugs in the code using type inference. |
Class | VERSION |
Undocumented |
Function | register |
Undocumented |
Constant | ASYNCIO |
Undocumented |
Constant | BUILTIN |
Undocumented |
Constant | MSGS |
Undocumented |
Constant | SEQUENCE |
Undocumented |
Constant | STR |
Undocumented |
Constant | TYPE |
Undocumented |
Constant | VERSION |
Undocumented |
Type Alias |
|
Undocumented |
Function | _ |
Undocumented |
Function | _determine |
Undocumented |
Function | _emit |
Try to see if no-member should be emitted for the given owner. |
Function | _enum |
Undocumented |
Function | _flatten |
Undocumented |
Function | _get |
Undocumented |
Function | _has |
Check if the given node has a parent of the given type. |
Function | _infer |
Try to infer what the given *func* constructor is building. |
Function | _is |
Undocumented |
Function | _is |
Undocumented |
Function | _is |
Undocumented |
Function | _is |
Check if the given owner should be ignored. |
Function | _missing |
Undocumented |
Function | _no |
Verify if the given call node has variadic nodes without context. |
Function | _no |
Undocumented |
Function | _no |
Undocumented |
Function | _node |
Undocumented |
Function | _similar |
Given an owner and a name, try to find similar names. |
Function | _string |
Undocumented |
Function | _unflatten |
Undocumented |
Type Variable | _T |
Undocumented |
Undocumented
Value |
|
Undocumented
Value |
|
@_node_names.register(
def _(node:
nodes.ClassDef|bases.Instance
) -> Iterable[ str]
:
(source)
¶
Undocumented
(nodes.Attribute|nodes.AssignAttr)|nodes.DelAttr
, owner: InferenceResult
, owner_name: str|None
, mixin_class_rgx: Pattern[ str]
, ignored_mixins: bool
= True, ignored_none: bool
= True) -> bool
:
(source)
¶
Try to see if no-member should be emitted for the given owner. The following cases are ignored: * the owner is a function and it has decorators. * the owner is an instance and it has __getattr__, __getattribute__ implemented * the module is explicitly ignored from no-member checks * the owner is a class and the name can be found in its metaclass. * The access node is protected by an except handler, which handles AttributeError, Exception or bare except. * The node is guarded behind and `IF` or `IFExp` node
astroid.Instance|nodes.ClassDef
, node: nodes.Attribute
) -> bool
:
(source)
¶
Undocumented
nodes.FunctionDef
, name: str|None
= None) -> set[ str]
:
(source)
¶
Undocumented
nodes.Call
, node_type: nodes.Keyword|nodes.Starred
, statement: nodes.Statement
) -> bool
:
(source)
¶
Check if the given node has a parent of the given type.
nodes.ClassDef
, func: nodes.FunctionDef
) -> InferenceResult|None
:
(source)
¶
Try to infer what the given *func* constructor is building. :param astroid.FunctionDef func: A metaclass constructor. Metaclass definitions can be functions, which should accept three arguments, the name of the class, the bases of the class and the attributes. The function could return anything, but usually it should be a proper metaclass. :param astroid.ClassDef cls: The class for which the *func* parameter should generate a metaclass. :returns: The class generated by the function or None, if we couldn't infer it. :rtype: astroid.ClassDef
SuccessfulInferenceResult
, attrname: str|None
, ignored_classes: Iterable[ str]
, ignored_modules: Iterable[ str]
) -> bool
:
(source)
¶
Check if the given owner should be ignored. This will verify if the owner's module is in *ignored_modules* or the owner's module fully qualified name is in *ignored_modules* or if the *ignored_modules* contains a pattern which catches the fully qualified name of the module. Also, similar checks are done for the owner itself, if its name matches any name from the *ignored_classes* or if its qualified name can be found in *ignored_classes*.
SuccessfulInferenceResult
, attrname: str|None
, distance_threshold: int
, max_choices: int
) -> str
:
(source)
¶
Undocumented
nodes.Call
, variadic_name: str|None
, variadic_type: nodes.Keyword|nodes.Starred
, variadics: list[ nodes.Keyword|nodes.Starred]
) -> bool
:
(source)
¶
Verify if the given call node has variadic nodes without context. This is a workaround for handling cases of nested call functions which don't have the specific call context at hand. Variadic arguments (variable positional arguments and variable keyword arguments) are inferred, inherently wrong, by astroid as a Tuple, respectively a Dict with empty elements. This can lead pylint to believe that a function call receives too few arguments.
SuccessfulInferenceResult
, attrname: str|None
, distance_threshold: int
, max_choices: int
) -> list[ str]
:
(source)
¶
Given an owner and a name, try to find similar names. The similar names are searched given a distance metric and only a given number of choices will be returned.