astroid API reference
400 public APIs from astroid (pylint-dev/astroid) — 135 classes, 61 functions, 204 methods. Signatures extracted by static analysis of the actual source.
Repository: pylint-dev/astroid
| Kind | Count |
|---|---|
| Classes | 135 |
| Functions | 61 |
| Methods | 204 |
API list
func
astroid._ast.parse_function_type_comment(type_comment:str) -> FunctionType | NoneGiven a correct type comment, obtain a FunctionType object.
class
astroid.arguments.CallSiteClass for understanding arguments passed into a call site.
class
astroid.bases.AsyncGeneratorSpecial node representing an async generator.
class
astroid.bases.BoundMethodA special node representing a method bound to an instance.
class
astroid.bases.GeneratorA special node representing a generator.
class
astroid.bases.InstanceA special node representing a class instance.
method
astroid.bases.Instance.bool_value(context:InferenceContext | None=None) -> bool | UninferableBaseInfer the truth value for an Instance.
class
astroid.bases.ProxyA simple proxy object.
class
astroid.bases.UnboundMethodA special node representing a method not bound to an instance.
class
astroid.bases.UnionTypeSpecial node representing new style typing unions.
func
astroid.brain.brain_boto3.service_request_transform(node:ClassDef) -> ClassDefTransform ServiceResource to look like dynamic classes.
func
astroid.brain.brain_builtin_inference.infer_bool(node, context:InferenceContext | None=None)Understand bool calls.
func
astroid.brain.brain_builtin_inference.infer_callable(node, context:InferenceContext | None=None)Understand callable calls.
func
astroid.brain.brain_builtin_inference.infer_dict(node:nodes.Call, context:InferenceContext | None=None) -> nodes.DictTry to infer a dict call to a Dict node.
func
astroid.brain.brain_builtin_inference.infer_dict_fromkeys(node, context:InferenceContext | None=None)Infer dict.fromkeys.
func
astroid.brain.brain_builtin_inference.infer_getattr(node, context:InferenceContext | None=None)Understand getattr calls.
func
astroid.brain.brain_builtin_inference.infer_hasattr(node, context:InferenceContext | None=None)Understand hasattr calls.
func
astroid.brain.brain_builtin_inference.infer_int(node, context:InferenceContext | None=None)Infer int() calls.
func
astroid.brain.brain_builtin_inference.infer_isinstance(callnode:nodes.Call, context:InferenceContext | None=None) -> nodes.ConstInfer isinstance calls.
func
astroid.brain.brain_builtin_inference.infer_issubclass(callnode, context:InferenceContext | None=None)Infer issubclass() calls.
func
astroid.brain.brain_builtin_inference.infer_len(node, context:InferenceContext | None=None) -> nodes.ConstInfer length calls.
func
astroid.brain.brain_builtin_inference.infer_property(node:nodes.Call, context:InferenceContext | None=None) -> objects.PropertyUnderstand `property` class.
func
astroid.brain.brain_builtin_inference.infer_slice(node, context:InferenceContext | None=None)Understand `slice` calls.
func
astroid.brain.brain_builtin_inference.infer_str(node, context:InferenceContext | None=None) -> nodes.ConstInfer str() calls.
func
astroid.brain.brain_builtin_inference.infer_super(node:nodes.Call, context:InferenceContext | None=None) -> objects.SuperUnderstand super calls.
func
astroid.brain.brain_builtin_inference.on_bootstrap()Called by astroid_bootstrapping().
func
astroid.brain.brain_dataclasses.dataclass_transform(node:nodes.ClassDef) -> nodes.ClassDef | NoneRewrite a dataclass to be easily understood by pylint.
func
astroid.brain.brain_dataclasses.infer_dataclass_field_call(node:nodes.Call, ctx:context.InferenceContext | None=None) -> Iterator[InferenceResult]Inference tip for dataclass field calls.
func
astroid.brain.brain_hypothesis.is_decorated_with_st_composite(node:FunctionDef) -> boolReturn whether a decorated node has @st.composite applied.
func
astroid.brain.brain_namedtuple_enum.infer_enum(node:nodes.Call, context:InferenceContext | None=None) -> Iterator[bases.Instance]Specific inference function for enum Call node.
func
astroid.brain.brain_namedtuple_enum.infer_enum_class(node:nodes.ClassDef) -> nodes.ClassDefSpecific inference for enums.
func
astroid.brain.brain_namedtuple_enum.infer_typing_namedtuple(node:nodes.Call, context:InferenceContext | None=None) -> Iterator[nodes.ClassDef]Infer a typing.NamedTuple(...) call.
func
astroid.brain.brain_numpy_ma.numpy_ma_transform() -> nodes.ModuleInfer the call of various numpy.ma functions.
func
astroid.brain.brain_numpy_utils.numpy_supports_type_hints() -> boolReturns True if numpy supports type hints.
func
astroid.brain.brain_statistics.register(manager:AstroidManager) -> NoneRegister statistics-specific inference improvements.
func
astroid.brain.brain_type.infer_type_sub(node, context:InferenceContext | None=None)Infer a type[...] subscript.
func
astroid.brain.brain_typing.infer_typedDict(node:nodes.FunctionDef, ctx:context.InferenceContext | None=None) -> Iterator[nodes.ClassDef]Replace TypedDict FunctionDef with ClassDef.
func
astroid.brain.brain_typing.infer_typing_attr(node:nodes.Subscript, ctx:context.InferenceContext | None=None) -> Iterator[nodes.ClassDef]Infer a typing.X[...] subscript.
func
astroid.brain.brain_typing.infer_typing_generic_class_pep695(node:nodes.ClassDef, ctx:context.InferenceContext | None=None) -> Iterator[nodes.ClassDef]Add __class_getitem__ for generic classes.
func
astroid.brain.helpers.is_class_var(node:NodeNG) -> boolReturn True if node is a ClassVar, with or without subscripting.
class
astroid.constraint.BooleanConstraintRepresents an "x" or "not x" constraint.
class
astroid.constraint.ConstraintRepresents a single constraint on a variable.
class
astroid.constraint.EqualityConstraintRepresents a "==" or "!=" constraint.
class
astroid.constraint.NoneConstraintRepresents an "is None" or "is not None" constraint.
class
astroid.constraint.TypeConstraintRepresents an "isinstance(x, y)" constraint.
func
astroid.constraint.get_constraints(expr:_NameNodes, frame:nodes.LocalsDictNodeNG) -> dict[nodes.NodeNG, set[Constraint]]Returns the constraints for the given expression.
class
astroid.context.CallContextHolds information for a call site.
class
astroid.context.InferenceContextProvide context for inference.
method
astroid.context.InferenceContext.clone() -> InferenceContextClone inference path.
method
astroid.context.InferenceContext.inferred() -> _InferenceCacheInferred node contexts to their mapped results.
method
astroid.context.InferenceContext.push(node:nodes.NodeNG) -> boolPush node into inference path.
func
astroid.context.copy_context(context:InferenceContext | None) -> InferenceContextClone a context if given, or return a fresh context.
func
astroid.decorators.deco(func:Callable[_P, _R]) -> Callable[_P, _R]Decorator function.
func
astroid.decorators.wrapped(node, context:InferenceContext | None=None, _func=func) -> GeneratorWrapper function handling context.
func
astroid.decorators.wrapper(*args:_P.args, **kwargs:_P.kwargs) -> _REmit DeprecationWarnings if conditions are met.
class
astroid.exceptions.AstroidBuildingErrorException class when we are unable to build an astroid representation.
class
astroid.exceptions.AstroidErrorBase exception class for all astroid related exceptions.
class
astroid.exceptions.AstroidIndexErrorRaised when an Indexable / Mapping does not have an index / key.
class
astroid.exceptions.AstroidSyntaxErrorException class used when a module can't be parsed.
class
astroid.exceptions.AstroidTypeErrorRaised when a TypeError would be expected in Python code.
class
astroid.exceptions.AstroidValueErrorRaised when a ValueError would be expected in Python code.
class
astroid.exceptions.InconsistentMroErrorError raised when a class's MRO is inconsistent.
class
astroid.exceptions.InferenceErrorRaised when we are unable to infer a node.
class
astroid.exceptions.InferenceOverwriteErrorRaised when an inference tip is overwritten.
class
astroid.exceptions.NameInferenceErrorRaised when a name lookup fails, corresponds to NameError.
class
astroid.exceptions.ParentMissingErrorRaised when a node which is expected to have a parent attribute is missing one.
class
astroid.exceptions.ResolveErrorBase class of astroid resolution/inference error.
class
astroid.exceptions.StatementMissingRaised when a call to node.statement() does not return a node.
class
astroid.exceptions.SuperErrorError raised when there is a problem with a *super* call.
func
astroid.helpers.class_instance_as_index(node:bases.Instance) -> nodes.Const | NoneGet the value as an index for the given instance.
func
astroid.helpers.has_known_bases(klass, context:InferenceContext | None=None) -> boolReturn whether all base classes of a class could be inferred.
func
astroid.helpers.is_subtype(type1, type2) -> boolCheck if *type1* is a subtype of *type2*.
func
astroid.helpers.is_supertype(type1, type2) -> boolCheck if *type2* is a supertype of *type1*.
func
astroid.helpers.object_len(node, context:InferenceContext | None=None)Infer length of given node object.
func
astroid.helpers.object_type(node:InferenceResult, context:InferenceContext | None=None) -> InferenceResult | NoneObtain the type of the given node.
func
astroid.inference_tip.clear_inference_tip_cache() -> NoneClear the inference tips cache.
class
astroid.interpreter._import.spec.ExplicitNamespacePackageFinderA finder for the explicit namespace packages.
method
astroid.interpreter._import.spec.Finder.find_module(modname:str, module_parts:tuple[str, ...], processed:tuple[str, ...], submodule_path:tuple[str, ...] | None) -> ModuleSpec | NoneFind the given module.
class
astroid.interpreter._import.spec.ImportlibFinderA finder based on the importlib module.
class
astroid.interpreter._import.spec.ModuleSpecDefines a class similar to PEP 420's ModuleSpec.
class
astroid.interpreter._import.spec.ModuleTypePython module types used for ModuleSpec.
class
astroid.interpreter._import.spec.PathSpecFinderFinder based on importlib.machinery.PathFinder.
class
astroid.interpreter._import.spec.ZipFinderFinder that knows how to find a module inside zip files.
func
astroid.interpreter._import.spec.find_spec(modpath:Iterable[str], path:Iterable[str] | None=None) -> ModuleSpecFind a spec for the given module.
func
astroid.interpreter.dunder_lookup.lookup(node:nodes.NodeNG, name:str, context:InferenceContext | None=None) -> listLookup the given special method name in the given *node*.
class
astroid.interpreter.objectmodel.ContextManagerModelModel for context managers.
class
astroid.interpreter.objectmodel.PropertyModelModel for a builtin property.
class
astroid.manager.AstroidManagerResponsible to build astroid from files or modules.
method
astroid.manager.AstroidManager.ast_from_class(klass:type, modname:str | None=None) -> nodes.ClassDefGet astroid for the given class.
method
astroid.manager.AstroidManager.ast_from_file(filepath:str, modname:str | None=None, fallback:bool=True, source:bool=False) -> nodes.ModuleGiven a module name, return the astroid object.
method
astroid.manager.AstroidManager.ast_from_module(module:types.ModuleType, modname:str | None=None) -> nodes.ModuleGiven an imported module, return the astroid object.
method
astroid.manager.AstroidManager.ast_from_module_name(modname:str | None, context_file:str | None=None, use_cache:bool=True) -> nodes.ModuleGiven a module name, return the astroid object.
method
astroid.manager.AstroidManager.cache_module(module:nodes.Module) -> NoneCache a module if no module with the same name is known yet.
method
astroid.manager.AstroidManager.infer_ast_from_something(obj:object, context:InferenceContext | None=None) -> Iterator[InferenceResult]Infer astroid for the given class.
method
astroid.manager.AstroidManager.visit_transforms(node:nodes.NodeNG) -> InferenceResultVisit the transforms and apply them to the given *node*.
func
astroid.modutils.check_modpath_has_init(path:str, mod_path:list[str]) -> boolCheck there are some __init__.py all along the way.
func
astroid.modutils.file_info_from_modpath(modpath:list[str], path:Sequence[str] | None=None, context_file:str | None=None) -> spec.ModuleSpecGiven a mod path (i.e.
func
astroid.modutils.is_python_source(filename:str | None) -> boolReturn: True if the filename is a python source file.
func
astroid.modutils.is_stdlib_module(modname:str) -> boolReturn: True if the modname is in the standard library
func
astroid.modutils.load_module_from_file(filepath:str) -> types.ModuleTypeLoad a Python module from it's path.
func
astroid.modutils.load_module_from_modpath(parts:Sequence[str]) -> types.ModuleTypeLoad a python module from its split name.
func
astroid.modutils.load_module_from_name(dotted_name:str) -> types.ModuleTypeLoad a Python module from its name.
func
astroid.modutils.modpath_from_file(filename:str, path:list[str] | None=None) -> list[str]Get the corresponding split module's name from a filename.
class
astroid.nodes._base_nodes.AssignTypeNodeBase node for nodes that can 'assign' such as AnnAssign.
class
astroid.nodes._base_nodes.FilterStmtsBaseNodeBase node for statement filtering and assignment type.
class
astroid.nodes._base_nodes.ImportNodeBase node for From and Import Nodes.
method
astroid.nodes._base_nodes.ImportNode.real_name(asname:str) -> strGet name from 'as' name.
class
astroid.nodes._base_nodes.LookupMixInMixin to look up a name in the right scope.
method
astroid.nodes._base_nodes.LookupMixIn.lookup(name:str) -> tuple[LocalsDictNodeNG, list[NodeNG]]Lookup where the given variable is assigned.
class
astroid.nodes._base_nodes.MultiLineBlockNodeBase node for multi-line blocks, e.g.
class
astroid.nodes._base_nodes.MultiLineWithElseBlockNodeBase node for multi-line blocks that can have else statements.
class
astroid.nodes._base_nodes.NoChildrenNodeBase nodes for nodes with no children, e.g.
class
astroid.nodes._base_nodes.StatementStatement node adding a few attributes.
method
astroid.nodes._base_nodes.Statement.next_sibling()The next sibling statement node.
method
astroid.nodes._base_nodes.Statement.previous_sibling()The previous sibling statement.
class
astroid.nodes.as_string.AsStringVisitorVisitor to render an Astroid node as a valid python code string
method
astroid.nodes.as_string.AsStringVisitor.handle_functiondef(node:nodes.FunctionDef, keyword:str) -> strreturn a (possibly async) function definition node as string
method
astroid.nodes.as_string.AsStringVisitor.visit_annassign(node:nodes.AnnAssign) -> strReturn an nodes.AnnAssign node as string
method
astroid.nodes.as_string.AsStringVisitor.visit_arguments(node:nodes.Arguments) -> strreturn an nodes.Arguments node as string
method
astroid.nodes.as_string.AsStringVisitor.visit_assert(node:nodes.Assert) -> strreturn an nodes.Assert node as string
method
astroid.nodes.as_string.AsStringVisitor.visit_assign(node:nodes.Assign) -> strreturn an nodes.Assign node as string
method
astroid.nodes.as_string.AsStringVisitor.visit_assignattr(node:nodes.AssignAttr) -> strreturn an nodes.AssignAttr node as string
method
astroid.nodes.as_string.AsStringVisitor.visit_assignname(node:nodes.AssignName) -> strreturn an nodes.AssignName node as string
method
astroid.nodes.as_string.AsStringVisitor.visit_asyncfunctiondef(node:nodes.AsyncFunctionDef) -> strreturn an nodes.AsyncFunction node as string
method
astroid.nodes.as_string.AsStringVisitor.visit_attribute(node:nodes.Attribute | nodes.AssignAttr | nodes.DelAttr) -> strreturn an nodes.Attribute node as string
method
astroid.nodes.as_string.AsStringVisitor.visit_augassign(node:nodes.AugAssign) -> strreturn an nodes.AugAssign node as string
method
astroid.nodes.as_string.AsStringVisitor.visit_binop(node:nodes.BinOp) -> strreturn an nodes.BinOp node as string
method
astroid.nodes.as_string.AsStringVisitor.visit_boolop(node:nodes.BoolOp) -> strreturn an nodes.BoolOp node as string
method
astroid.nodes.as_string.AsStringVisitor.visit_break(node:nodes.Break) -> strreturn an nodes.Break node as string
method
astroid.nodes.as_string.AsStringVisitor.visit_call(node:nodes.Call) -> strreturn an nodes.Call node as string
method
astroid.nodes.as_string.AsStringVisitor.visit_classdef(node:nodes.ClassDef) -> strreturn an nodes.ClassDef node as string
method
astroid.nodes.as_string.AsStringVisitor.visit_compare(node:nodes.Compare) -> strreturn an nodes.Compare node as string
method
astroid.nodes.as_string.AsStringVisitor.visit_comprehension(node:nodes.Comprehension) -> strreturn an nodes.Comprehension node as string
method
astroid.nodes.as_string.AsStringVisitor.visit_const(node:nodes.Const) -> strreturn an nodes.Const node as string
method
astroid.nodes.as_string.AsStringVisitor.visit_continue(node:nodes.Continue) -> strreturn an nodes.Continue node as string
method
astroid.nodes.as_string.AsStringVisitor.visit_decorators(node:nodes.Decorators) -> strreturn an nodes.Decorators node as string
method
astroid.nodes.as_string.AsStringVisitor.visit_delattr(node:nodes.DelAttr) -> strreturn an nodes.DelAttr node as string
method
astroid.nodes.as_string.AsStringVisitor.visit_delete(node:nodes.Delete) -> strreturn an nodes.Delete node as string
method
astroid.nodes.as_string.AsStringVisitor.visit_delname(node:nodes.DelName) -> strreturn an nodes.DelName node as string
method
astroid.nodes.as_string.AsStringVisitor.visit_dict(node:nodes.Dict) -> strreturn an nodes.Dict node as string
method
astroid.nodes.as_string.AsStringVisitor.visit_dictcomp(node:nodes.DictComp) -> strreturn an nodes.DictComp node as string
method
astroid.nodes.as_string.AsStringVisitor.visit_empty(node:nodes.EmptyNode) -> strreturn an EmptyNode as string
method
astroid.nodes.as_string.AsStringVisitor.visit_emptynode(node:nodes.EmptyNode) -> strdummy method for visiting an EmptyNode
method
astroid.nodes.as_string.AsStringVisitor.visit_expr(node:nodes.Expr) -> strreturn an nodes.Expr node as string
method
astroid.nodes.as_string.AsStringVisitor.visit_for(node:nodes.For) -> strreturn an nodes.For node as string
method
astroid.nodes.as_string.AsStringVisitor.visit_functiondef(node:nodes.FunctionDef) -> strreturn an nodes.FunctionDef node as string
method
astroid.nodes.as_string.AsStringVisitor.visit_generatorexp(node:nodes.GeneratorExp) -> strreturn an nodes.GeneratorExp node as string
method
astroid.nodes.as_string.AsStringVisitor.visit_global(node:nodes.Global) -> strreturn an nodes.Global node as string
method
astroid.nodes.as_string.AsStringVisitor.visit_if(node:nodes.If) -> strreturn an nodes.If node as string
method
astroid.nodes.as_string.AsStringVisitor.visit_ifexp(node:nodes.IfExp) -> strreturn an nodes.IfExp node as string
method
astroid.nodes.as_string.AsStringVisitor.visit_import(node:nodes.Import) -> strreturn an nodes.Import node as string
method
astroid.nodes.as_string.AsStringVisitor.visit_importfrom(node:nodes.ImportFrom) -> strreturn an nodes.ImportFrom node as string
method
astroid.nodes.as_string.AsStringVisitor.visit_interpolation(node:nodes.Interpolation) -> strReturn an nodes.Interpolation node as string.
method
astroid.nodes.as_string.AsStringVisitor.visit_keyword(node:nodes.Keyword) -> strreturn an nodes.Keyword node as string
method
astroid.nodes.as_string.AsStringVisitor.visit_lambda(node:nodes.Lambda) -> strreturn an nodes.Lambda node as string
method
astroid.nodes.as_string.AsStringVisitor.visit_list(node:nodes.List) -> strreturn an nodes.List node as string
method
astroid.nodes.as_string.AsStringVisitor.visit_listcomp(node:nodes.ListComp) -> strreturn an nodes.ListComp node as string
method
astroid.nodes.as_string.AsStringVisitor.visit_match(node:nodes.Match) -> strReturn an nodes.Match node as string.
method
astroid.nodes.as_string.AsStringVisitor.visit_matchas(node:nodes.MatchAs) -> strReturn an nodes..MatchAs node as string.
method
astroid.nodes.as_string.AsStringVisitor.visit_matchcase(node:nodes.MatchCase) -> strReturn an nodes.MatchCase node as string.
method
astroid.nodes.as_string.AsStringVisitor.visit_matchclass(node:nodes.MatchClass) -> strReturn an nodes..MatchClass node as string.
method
astroid.nodes.as_string.AsStringVisitor.visit_matchmapping(node:nodes.MatchMapping) -> strReturn an nodes..MatchMapping node as string.
method
astroid.nodes.as_string.AsStringVisitor.visit_matchor(node:nodes.MatchOr) -> strReturn an nodes.MatchOr node as string.
method
astroid.nodes.as_string.AsStringVisitor.visit_matchsequence(node:nodes.MatchSequence) -> strReturn an nodes.MatchSequence node as string.
method
astroid.nodes.as_string.AsStringVisitor.visit_matchsingleton(node:nodes.MatchSingleton) -> strReturn an nodes.MatchSingleton node as string.
method
astroid.nodes.as_string.AsStringVisitor.visit_matchstar(node:nodes.MatchStar) -> strReturn an nodes..MatchStar node as string.
method
astroid.nodes.as_string.AsStringVisitor.visit_matchvalue(node:nodes.MatchValue) -> strReturn an nodes.MatchValue node as string.
method
astroid.nodes.as_string.AsStringVisitor.visit_module(node:nodes.Module) -> strreturn an nodes.Module node as string
method
astroid.nodes.as_string.AsStringVisitor.visit_name(node:nodes.Name) -> strreturn an nodes.Name node as string
method
astroid.nodes.as_string.AsStringVisitor.visit_nonlocal(node:nodes.Nonlocal) -> strreturn an nodes.Nonlocal node as string
method
astroid.nodes.as_string.AsStringVisitor.visit_paramspec(node:nodes.ParamSpec) -> strreturn an nodes.ParamSpec node as string
method
astroid.nodes.as_string.AsStringVisitor.visit_partialfunction(node:objects.PartialFunction) -> strReturn an objects.PartialFunction as string.
method
astroid.nodes.as_string.AsStringVisitor.visit_pass(node:nodes.Pass) -> strreturn an nodes.Pass node as string
method
astroid.nodes.as_string.AsStringVisitor.visit_raise(node:nodes.Raise) -> strreturn an nodes.Raise node as string
method
astroid.nodes.as_string.AsStringVisitor.visit_return(node:nodes.Return) -> strreturn an nodes.Return node as string
method
astroid.nodes.as_string.AsStringVisitor.visit_set(node:nodes.Set) -> strreturn an nodes.Set node as string
method
astroid.nodes.as_string.AsStringVisitor.visit_setcomp(node:nodes.SetComp) -> strreturn an nodes.SetComp node as string
method
astroid.nodes.as_string.AsStringVisitor.visit_slice(node:nodes.Slice) -> strreturn an nodes.Slice node as string
method
astroid.nodes.as_string.AsStringVisitor.visit_starred(node:nodes.Starred) -> strreturn Starred node as string
method
astroid.nodes.as_string.AsStringVisitor.visit_subscript(node:nodes.Subscript) -> strreturn an nodes.Subscript node as string
method
astroid.nodes.as_string.AsStringVisitor.visit_templatestr(node:nodes.TemplateStr) -> strReturn an nodes.TemplateStr node as string.
method
astroid.nodes.as_string.AsStringVisitor.visit_try(node:nodes.Try) -> strreturn an nodes.Try node as string
method
astroid.nodes.as_string.AsStringVisitor.visit_trystar(node:nodes.TryStar) -> strreturn an nodes.TryStar node as string
method
astroid.nodes.as_string.AsStringVisitor.visit_tuple(node:nodes.Tuple) -> strreturn an nodes.Tuple node as string
method
astroid.nodes.as_string.AsStringVisitor.visit_typealias(node:nodes.TypeAlias) -> strreturn an nodes.TypeAlias node as string
method
astroid.nodes.as_string.AsStringVisitor.visit_typevar(node:nodes.TypeVar) -> strreturn an nodes.TypeVar node as string
method
astroid.nodes.as_string.AsStringVisitor.visit_typevartuple(node:nodes.TypeVarTuple) -> strreturn an nodes.TypeVarTuple node as string
method
astroid.nodes.as_string.AsStringVisitor.visit_unaryop(node:nodes.UnaryOp) -> strreturn an nodes.UnaryOp node as string
method
astroid.nodes.as_string.AsStringVisitor.visit_while(node:nodes.While) -> strreturn an nodes.While node as string
method
astroid.nodes.as_string.AsStringVisitor.visit_with(node:nodes.With) -> strreturn an nodes.With node as string
method
astroid.nodes.as_string.AsStringVisitor.visit_yield(node:nodes.Yield) -> stryield an ast.Yield node as string
method
astroid.nodes.as_string.AsStringVisitor.visit_yieldfrom(node:nodes.YieldFrom) -> strReturn an nodes.YieldFrom node as string.
class
astroid.nodes.node_classes.AnnAssignClass representing an :class:`ast.AnnAssign` node.
class
astroid.nodes.node_classes.ArgumentsClass representing an :class:`ast.arguments` node.
method
astroid.nodes.node_classes.Arguments.format_args(*skippable_names:set[str] | None=None) -> strGet the arguments formatted as string.
method
astroid.nodes.node_classes.Arguments.get_annotations() -> Iterator[nodes.NodeNG]Iterate over all annotations nodes.
method
astroid.nodes.node_classes.Arguments.is_argument(name) -> boolCheck if the given name is defined in the arguments.
class
astroid.nodes.node_classes.AssertClass representing an :class:`ast.Assert` node.
class
astroid.nodes.node_classes.AssignClass representing an :class:`ast.Assign` node.
class
astroid.nodes.node_classes.AsyncForClass representing an :class:`ast.AsyncFor` node.
class
astroid.nodes.node_classes.AsyncWithAsynchronous ``with`` built with the ``async`` keyword.
class
astroid.nodes.node_classes.AttributeClass representing an :class:`ast.Attribute` node.
class
astroid.nodes.node_classes.AugAssignClass representing an :class:`ast.AugAssign` node.
class
astroid.nodes.node_classes.AwaitClass representing an :class:`ast.Await` node.
class
astroid.nodes.node_classes.BaseContainerBase class for Set, FrozenSet, Tuple and List.
method
astroid.nodes.node_classes.BaseContainer.bool_value(context:InferenceContext | None=None) -> boolDetermine the boolean value of this node.
method
astroid.nodes.node_classes.BaseContainer.from_elements(elts:Iterable[Any]) -> SelfCreate a node of this type from the given list of elements.
method
astroid.nodes.node_classes.BaseContainer.pytype() -> strGet the name of the type that this node represents.
class
astroid.nodes.node_classes.BinOpClass representing an :class:`ast.BinOp` node.
class
astroid.nodes.node_classes.BoolOpClass representing an :class:`ast.BoolOp` node.
method
astroid.nodes.node_classes.BoolOp.postinit(values:list[NodeNG] | None=None) -> NoneDo some setup after initialisation.
class
astroid.nodes.node_classes.BreakClass representing an :class:`ast.Break` node.
class
astroid.nodes.node_classes.CallClass representing an :class:`ast.Call` node.
method
astroid.nodes.node_classes.Call.kwargs() -> list[Keyword]The keyword arguments that unpack something.
method
astroid.nodes.node_classes.Call.starargs() -> list[Starred]The positional arguments that unpack something.
class
astroid.nodes.node_classes.CompareClass representing an :class:`ast.Compare` node.
class
astroid.nodes.node_classes.ComprehensionClass representing an :class:`ast.comprehension` node.
class
astroid.nodes.node_classes.ConstClass representing any constant including num, str, bool, None, bytes.
method
astroid.nodes.node_classes.Const.bool_value(context:InferenceContext | None=None)Determine the boolean value of this node.
method
astroid.nodes.node_classes.Const.pytype() -> strGet the name of the type that this node represents.
class
astroid.nodes.node_classes.ContinueClass representing an :class:`ast.Continue` node.
class
astroid.nodes.node_classes.DecoratorsA node representing a list of decorators.
method
astroid.nodes.node_classes.Decorators.frame() -> FrameTypeThe first parent node defining a new frame.
method
astroid.nodes.node_classes.Decorators.scope() -> LocalsDictNodeNGThe first parent node defining a new scope.
class
astroid.nodes.node_classes.DeleteClass representing an :class:`ast.Delete` node.
class
astroid.nodes.node_classes.DictClass representing an :class:`ast.Dict` node.
method
astroid.nodes.node_classes.Dict.bool_value(context:InferenceContext | None=None)Determine the boolean value of this node.
method
astroid.nodes.node_classes.Dict.getitem(index:Const | Slice, context:InferenceContext | None=None) -> NodeNGGet an item from this node.
method
astroid.nodes.node_classes.Dict.postinit(items:list[tuple[InferenceResult, InferenceResult]]) -> NoneDo some setup after initialisation.
method
astroid.nodes.node_classes.Dict.pytype() -> Literal['builtins.dict']Get the name of the type that this node represents.
class
astroid.nodes.node_classes.ExceptHandlerClass representing an :class:`ast.ExceptHandler`.
class
astroid.nodes.node_classes.ExprClass representing an :class:`ast.Expr` node.
class
astroid.nodes.node_classes.ForClass representing an :class:`ast.For` node.
class
astroid.nodes.node_classes.FormattedValueClass representing an :class:`ast.FormattedValue` node.
method
astroid.nodes.node_classes.FormattedValue.postinit(*value:NodeNG, *conversion:int, *format_spec:JoinedStr | None=None) -> NoneDo some setup after initialisation.
class
astroid.nodes.node_classes.GlobalClass representing an :class:`ast.Global` node.
class
astroid.nodes.node_classes.IfClass representing an :class:`ast.If` node.
class
astroid.nodes.node_classes.IfExpClass representing an :class:`ast.IfExp` node.
class
astroid.nodes.node_classes.ImportClass representing an :class:`ast.Import` node.
class
astroid.nodes.node_classes.ImportFromClass representing an :class:`ast.ImportFrom` node.
class
astroid.nodes.node_classes.InterpolationClass representing an :class:`ast.Interpolation` node.
class
astroid.nodes.node_classes.JoinedStrRepresents a list of string expressions to be joined.
method
astroid.nodes.node_classes.JoinedStr.postinit(values:list[NodeNG] | None=None) -> NoneDo some setup after initialisation.
class
astroid.nodes.node_classes.KeywordClass representing an :class:`ast.keyword` node.
class
astroid.nodes.node_classes.ListClass representing an :class:`ast.List` node.
method
astroid.nodes.node_classes.List.getitem(index, context:InferenceContext | None=None)Get an item from this node.
method
astroid.nodes.node_classes.List.pytype() -> Literal['builtins.list']Get the name of the type that this node represents.
class
astroid.nodes.node_classes.MatchClass representing a :class:`ast.Match` node.
class
astroid.nodes.node_classes.MatchAsClass representing a :class:`ast.MatchAs` node.
class
astroid.nodes.node_classes.MatchCaseClass representing a :class:`ast.match_case` node.
class
astroid.nodes.node_classes.MatchClassClass representing a :class:`ast.MatchClass` node.
class
astroid.nodes.node_classes.MatchMappingClass representing a :class:`ast.MatchMapping` node.
class
astroid.nodes.node_classes.MatchOrClass representing a :class:`ast.MatchOr` node.
class
astroid.nodes.node_classes.MatchSequenceClass representing a :class:`ast.MatchSequence` node.
class
astroid.nodes.node_classes.MatchSingletonClass representing a :class:`ast.MatchSingleton` node.
class
astroid.nodes.node_classes.MatchStarClass representing a :class:`ast.MatchStar` node.
class
astroid.nodes.node_classes.MatchValueClass representing a :class:`ast.MatchValue` node.
class
astroid.nodes.node_classes.NameClass representing an :class:`ast.Name` node.
class
astroid.nodes.node_classes.NonlocalClass representing an :class:`ast.Nonlocal` node.
class
astroid.nodes.node_classes.ParamSpecClass representing a :class:`ast.ParamSpec` node.
method
astroid.nodes.node_classes.ParamSpec.qname() -> Literal['typing.ParamSpec']Get the qualified name of the type that this node represents.
class
astroid.nodes.node_classes.PassClass representing an :class:`ast.Pass` node.
class
astroid.nodes.node_classes.PatternBase class for all Pattern nodes.
class
astroid.nodes.node_classes.RaiseClass representing an :class:`ast.Raise` node.
class
astroid.nodes.node_classes.ReturnClass representing an :class:`ast.Return` node.
class
astroid.nodes.node_classes.SetClass representing an :class:`ast.Set` node.
method
astroid.nodes.node_classes.Set.pytype() -> Literal['builtins.set']Get the name of the type that this node represents.
class
astroid.nodes.node_classes.SliceClass representing an :class:`ast.Slice` node.
method
astroid.nodes.node_classes.Slice.display_type() -> Literal['Slice']A human readable type of this node.
method
astroid.nodes.node_classes.Slice.pytype() -> Literal['builtins.slice']Get the name of the type that this node represents.
class
astroid.nodes.node_classes.StarredClass representing an :class:`ast.Starred` node.
class
astroid.nodes.node_classes.SubscriptClass representing an :class:`ast.Subscript` node.
class
astroid.nodes.node_classes.TemplateStrClass representing an :class:`ast.TemplateStr` node.
class
astroid.nodes.node_classes.TryClass representing a :class:`ast.Try` node.
method
astroid.nodes.node_classes.Try.block_range(lineno:int) -> tuple[int, int]Get a range from a given line number to where this node ends.
method
astroid.nodes.node_classes.Try.postinit(*body:list[NodeNG], *handlers:list[ExceptHandler], *orelse:list[NodeNG], *finalbody:list[NodeNG]) -> NoneDo some setup after initialisation.
class
astroid.nodes.node_classes.TryStarClass representing an :class:`ast.TryStar` node.
method
astroid.nodes.node_classes.TryStar.block_range(lineno:int) -> tuple[int, int]Get a range from a given line number to where this node ends.
method
astroid.nodes.node_classes.TryStar.postinit(*body:list[NodeNG] | None=None, *handlers:list[ExceptHandler] | None=None, *orelse:list[NodeNG] | None=None, *finalbody:list[NodeNG] | None=None) -> NoneDo some setup after initialisation.
class
astroid.nodes.node_classes.TupleClass representing an :class:`ast.Tuple` node.
method
astroid.nodes.node_classes.Tuple.getitem(index, context:InferenceContext | None=None)Get an item from this node.
method
astroid.nodes.node_classes.Tuple.pytype() -> Literal['builtins.tuple']Get the name of the type that this node represents.
class
astroid.nodes.node_classes.TypeAliasClass representing a :class:`ast.TypeAlias` node.
class
astroid.nodes.node_classes.TypeVarClass representing a :class:`ast.TypeVar` node.
class
astroid.nodes.node_classes.TypeVarTupleClass representing a :class:`ast.TypeVarTuple` node.
class
astroid.nodes.node_classes.UnaryOpClass representing an :class:`ast.UnaryOp` node.
class
astroid.nodes.node_classes.WhileClass representing an :class:`ast.While` node.
class
astroid.nodes.node_classes.WithClass representing an :class:`ast.With` node.
method
astroid.nodes.node_classes.With.get_children()Get the child nodes below this node.
method
astroid.nodes.node_classes.With.postinit(items:list[tuple[NodeNG, NodeNG | None]] | None=None, body:list[NodeNG] | None=None, type_annotation:NodeNG | None=None) -> NoneDo some setup after initialisation.
class
astroid.nodes.node_classes.YieldClass representing an :class:`ast.Yield` node.
class
astroid.nodes.node_classes.YieldFromClass representing an :class:`ast.YieldFrom` node.
func
astroid.nodes.node_classes.const_factory(value:Any) -> ConstFactoryResultReturn an astroid node for a python value.
class
astroid.nodes.node_ng.NodeNGA node of the new Abstract Syntax Tree (AST).
method
astroid.nodes.node_ng.NodeNG.accept(visitor:AsStringVisitor) -> strVisit this node using the given visitor.
method
astroid.nodes.node_ng.NodeNG.as_string() -> strGet the source code that this node represents.
method
astroid.nodes.node_ng.NodeNG.block_range(lineno:int) -> tuple[int, int]Get a range from the given line number to where this node ends.
method
astroid.nodes.node_ng.NodeNG.bool_value(context:InferenceContext | None=None)Determine the boolean value of this node.
method
astroid.nodes.node_ng.NodeNG.callable() -> boolWhether this node defines something that is callable.
method
astroid.nodes.node_ng.NodeNG.child_sequence(child)Search for the sequence that contains this child.
method
astroid.nodes.node_ng.NodeNG.frame() -> FrameTypeThe first parent frame node.
method
astroid.nodes.node_ng.NodeNG.get_children() -> Iterator[NodeNG]Get the child nodes below this node.
method
astroid.nodes.node_ng.NodeNG.has_base(node) -> boolCheck if this node inherits from the given type.
method
astroid.nodes.node_ng.NodeNG.infer(context:InferenceContext | None=None) -> Generator[InferenceResult]Get a generator of the inferred values.
method
astroid.nodes.node_ng.NodeNG.inferred()Get a list of the inferred values.
method
astroid.nodes.node_ng.NodeNG.last_child() -> NodeNG | NoneAn optimized version of list(get_children())[-1].
method
astroid.nodes.node_ng.NodeNG.next_sibling()The next sibling statement node.
method
astroid.nodes.node_ng.NodeNG.node_ancestors() -> Iterator[NodeNG]Yield parent, grandparent, etc until there are no more.
method
astroid.nodes.node_ng.NodeNG.parent_of(node) -> boolCheck if this node is the parent of the given node.
method
astroid.nodes.node_ng.NodeNG.previous_sibling()The previous sibling statement.
method
astroid.nodes.node_ng.NodeNG.repr_name() -> strGet a name for nice representation.
method
astroid.nodes.node_ng.NodeNG.root() -> nodes.ModuleReturn the root node of the syntax tree.
method
astroid.nodes.node_ng.NodeNG.scope() -> nodes.LocalsDictNodeNGThe first parent node defining a new scope.
method
astroid.nodes.node_ng.NodeNG.statement() -> _base_nodes.StatementThe first parent node, including self, marked as statement node.
class
astroid.nodes.scoped_nodes.mixin.ComprehensionScopeScoping for different types of comprehensions.
class
astroid.nodes.scoped_nodes.scoped_nodes.AsyncFunctionDefClass representing an :class:`ast.FunctionDef` node.
class
astroid.nodes.scoped_nodes.scoped_nodes.ClassDefClass representing an :class:`ast.ClassDef` node.
method
astroid.nodes.scoped_nodes.scoped_nodes.ClassDef.bool_value(context:InferenceContext | None=None) -> Literal[True]Determine the boolean value of this node.
method
astroid.nodes.scoped_nodes.scoped_nodes.ClassDef.display_type() -> strA human readable type of this node.
method
astroid.nodes.scoped_nodes.scoped_nodes.ClassDef.frame(*future:Literal[None, True]=None) -> SelfThe node's frame node.
method
astroid.nodes.scoped_nodes.scoped_nodes.ClassDef.is_subtype_of(type_name, context:InferenceContext | None=None) -> boolWhether this class is a subtype of the given type.
method
astroid.nodes.scoped_nodes.scoped_nodes.ClassDef.metaclass(context:InferenceContext | None=None) -> SuccessfulInferenceResult | NoneGet the metaclass of this class.
method
astroid.nodes.scoped_nodes.scoped_nodes.ClassDef.scope_lookup(node:LookupMixIn, name:str, offset:int=0) -> tuple[LocalsDictNodeNG, list[nodes.NodeNG]]Lookup where the given name is assigned.
class
astroid.nodes.scoped_nodes.scoped_nodes.DictCompClass representing an :class:`ast.DictComp` node.
class
astroid.nodes.scoped_nodes.scoped_nodes.FunctionDefClass representing an :class:`ast.FunctionDef`.
method
astroid.nodes.scoped_nodes.scoped_nodes.FunctionDef.bool_value(context:InferenceContext | None=None) -> boolDetermine the boolean value of this node.
method
astroid.nodes.scoped_nodes.scoped_nodes.FunctionDef.display_type() -> strA human readable type of this node.
method
astroid.nodes.scoped_nodes.scoped_nodes.FunctionDef.frame(*future:Literal[None, True]=None) -> SelfThe node's frame node.
method
astroid.nodes.scoped_nodes.scoped_nodes.FunctionDef.is_abstract(pass_is_abstract=True, any_raise_is_abstract=False) -> boolCheck if the method is abstract.
method
astroid.nodes.scoped_nodes.scoped_nodes.FunctionDef.is_generator() -> boolCheck if this is a generator function.
method
astroid.nodes.scoped_nodes.scoped_nodes.FunctionDef.is_method() -> boolCheck if this function node represents a method.
method
astroid.nodes.scoped_nodes.scoped_nodes.FunctionDef.scope_lookup(node:LookupMixIn, name:str, offset:int=0) -> tuple[LocalsDictNodeNG, list[nodes.NodeNG]]Lookup where the given name is assigned.
method
astroid.nodes.scoped_nodes.scoped_nodes.FunctionDef.type() -> strThe function type for this node.
class
astroid.nodes.scoped_nodes.scoped_nodes.GeneratorExpClass representing an :class:`ast.GeneratorExp` node.
method
astroid.nodes.scoped_nodes.scoped_nodes.GeneratorExp.bool_value(context:InferenceContext | None=None) -> Literal[True]Determine the boolean value of this node.
class
astroid.nodes.scoped_nodes.scoped_nodes.LambdaClass representing an :class:`ast.Lambda` node.
method
astroid.nodes.scoped_nodes.scoped_nodes.Lambda.bool_value(context:InferenceContext | None=None) -> Literal[True]Determine the boolean value of this node.
method
astroid.nodes.scoped_nodes.scoped_nodes.Lambda.display_type() -> strA human readable type of this node.
method
astroid.nodes.scoped_nodes.scoped_nodes.Lambda.frame(*future:Literal[None, True]=None) -> SelfThe node's frame node.
method
astroid.nodes.scoped_nodes.scoped_nodes.Lambda.scope_lookup(node:LookupMixIn, name:str, offset:int=0) -> tuple[LocalsDictNodeNG, list[NodeNG]]Lookup where the given names is assigned.
method
astroid.nodes.scoped_nodes.scoped_nodes.Lambda.type() -> Literal['method', 'function']Whether this is a method or function.
class
astroid.nodes.scoped_nodes.scoped_nodes.ListCompClass representing an :class:`ast.ListComp` node.
class
astroid.nodes.scoped_nodes.scoped_nodes.ModuleClass representing an :class:`ast.Module` node.
method
astroid.nodes.scoped_nodes.scoped_nodes.Module.bool_value(context:InferenceContext | None=None) -> boolDetermine the boolean value of this node.
method
astroid.nodes.scoped_nodes.scoped_nodes.Module.display_type() -> strA human readable type of this node.
method
astroid.nodes.scoped_nodes.scoped_nodes.Module.frame(*future:Literal[None, True]=None) -> SelfThe node's frame node.
method
astroid.nodes.scoped_nodes.scoped_nodes.Module.igetattr(name:str, context:InferenceContext | None=None) -> Iterator[InferenceResult]Infer the possible values of the given variable.
method
astroid.nodes.scoped_nodes.scoped_nodes.Module.relative_to_absolute_name(modname:str, level:int | None) -> strGet the absolute module name for a relative import.
class
astroid.nodes.scoped_nodes.scoped_nodes.SetCompClass representing an :class:`ast.SetComp` node.
func
astroid.nodes.scoped_nodes.utils.builtin_lookup(name:str) -> tuple[nodes.Module, list[nodes.NodeNG]]Lookup a name in the builtin module.
class
astroid.nodes.utils.PositionPosition with line and column information.
class
astroid.objects.DictInstanceSpecial kind of instances for dictionaries.
class
astroid.objects.ExceptionInstanceClass for instances of exceptions.
class
astroid.objects.FrozenSetClass representing a FrozenSet composite node.
class
astroid.objects.PropertyClass representing a Python property.
class
astroid.objects.SuperProxy class over a super call.
method
astroid.objects.Super.name()Get the name of the MRO pointer.
func
astroid.raw_building.build_class(name:str, parent:nodes.NodeNG, basenames:Iterable[str]=(), doc:str | None=None) -> nodes.ClassDefCreate and initialize an astroid ClassDef node.
func
astroid.raw_building.build_from_import(fromname:str, names:list[str]) -> nodes.ImportFromcreate and initialize an astroid ImportFrom import statement
func
astroid.raw_building.build_module(name:str, doc:str | None=None) -> nodes.Modulecreate and initialize an astroid Module node
func
astroid.raw_building.object_build_class(node:nodes.Module | nodes.ClassDef, member:type) -> nodes.ClassDefcreate astroid for a living class object
func
astroid.raw_building.object_build_function(node:nodes.Module | nodes.ClassDef, member:_FunctionTypes) -> nodes.FunctionDefcreate astroid for a living function object
class
astroid.rebuilder.TreeRebuilderRebuilds the _ast tree to become an Astroid tree.
method
astroid.rebuilder.TreeRebuilder.visit_arg(node:ast.arg, parent:nodes.NodeNG) -> nodes.AssignNameVisit an arg node by returning a fresh AssignName instance.
method
astroid.rebuilder.TreeRebuilder.visit_assert(node:ast.Assert, parent:nodes.NodeNG) -> nodes.AssertVisit a Assert node by returning a fresh instance of it.
method
astroid.rebuilder.TreeRebuilder.visit_assign(node:ast.Assign, parent:nodes.NodeNG) -> nodes.AssignVisit a Assign node by returning a fresh instance of it.
method
astroid.rebuilder.TreeRebuilder.visit_binop(node:ast.BinOp, parent:nodes.NodeNG) -> nodes.BinOpVisit a BinOp node by returning a fresh instance of it.
method
astroid.rebuilder.TreeRebuilder.visit_boolop(node:ast.BoolOp, parent:nodes.NodeNG) -> nodes.BoolOpVisit a BoolOp node by returning a fresh instance of it.
method
astroid.rebuilder.TreeRebuilder.visit_break(node:ast.Break, parent:nodes.NodeNG) -> nodes.BreakVisit a Break node by returning a fresh instance of it.
method
astroid.rebuilder.TreeRebuilder.visit_call(node:ast.Call, parent:nodes.NodeNG) -> nodes.CallVisit a CallFunc node by returning a fresh instance of it.
method
astroid.rebuilder.TreeRebuilder.visit_classdef(node:ast.ClassDef, parent:nodes.NodeNG) -> nodes.ClassDefVisit a ClassDef node to become astroid.
method
astroid.rebuilder.TreeRebuilder.visit_compare(node:ast.Compare, parent:nodes.NodeNG) -> nodes.CompareVisit a Compare node by returning a fresh instance of it.
method
astroid.rebuilder.TreeRebuilder.visit_delete(node:ast.Delete, parent:nodes.NodeNG) -> nodes.DeleteVisit a Delete node by returning a fresh instance of it.
method
astroid.rebuilder.TreeRebuilder.visit_dict(node:ast.Dict, parent:nodes.NodeNG) -> nodes.DictVisit a Dict node by returning a fresh instance of it.
method
astroid.rebuilder.TreeRebuilder.visit_expr(node:ast.Expr, parent:nodes.NodeNG) -> nodes.ExprVisit a Expr node by returning a fresh instance of it.
method
astroid.rebuilder.TreeRebuilder.visit_global(node:ast.Global, parent:nodes.NodeNG) -> nodes.GlobalVisit a Global node to become astroid.
method
astroid.rebuilder.TreeRebuilder.visit_if(node:ast.If, parent:nodes.NodeNG) -> nodes.IfVisit an If node by returning a fresh instance of it.
method
astroid.rebuilder.TreeRebuilder.visit_ifexp(node:ast.IfExp, parent:nodes.NodeNG) -> nodes.IfExpVisit a IfExp node by returning a fresh instance of it.
method
astroid.rebuilder.TreeRebuilder.visit_import(node:ast.Import, parent:nodes.NodeNG) -> nodes.ImportVisit a Import node by returning a fresh instance of it.
method
astroid.rebuilder.TreeRebuilder.visit_keyword(node:ast.keyword, parent:nodes.NodeNG) -> nodes.KeywordVisit a Keyword node by returning a fresh instance of it.
method
astroid.rebuilder.TreeRebuilder.visit_lambda(node:ast.Lambda, parent:nodes.NodeNG) -> nodes.LambdaVisit a Lambda node by returning a fresh instance of it.
method
astroid.rebuilder.TreeRebuilder.visit_list(node:ast.List, parent:nodes.NodeNG) -> nodes.ListVisit a List node by returning a fresh instance of it.
method
astroid.rebuilder.TreeRebuilder.visit_nonlocal(node:ast.Nonlocal, parent:nodes.NodeNG) -> nodes.NonlocalVisit a Nonlocal node and return a new instance of it.
method
astroid.rebuilder.TreeRebuilder.visit_pass(node:ast.Pass, parent:nodes.NodeNG) -> nodes.PassVisit a Pass node by returning a fresh instance of it.
method
astroid.rebuilder.TreeRebuilder.visit_raise(node:ast.Raise, parent:nodes.NodeNG) -> nodes.RaiseVisit a Raise node by returning a fresh instance of it.
method
astroid.rebuilder.TreeRebuilder.visit_return(node:ast.Return, parent:nodes.NodeNG) -> nodes.ReturnVisit a Return node by returning a fresh instance of it.
method
astroid.rebuilder.TreeRebuilder.visit_set(node:ast.Set, parent:nodes.NodeNG) -> nodes.SetVisit a Set node by returning a fresh instance of it.
method
astroid.rebuilder.TreeRebuilder.visit_setcomp(node:ast.SetComp, parent:nodes.NodeNG) -> nodes.SetCompVisit a SetComp node by returning a fresh instance of it.
method
astroid.rebuilder.TreeRebuilder.visit_slice(node:ast.Slice, parent:nodes.Subscript) -> nodes.SliceVisit a Slice node by returning a fresh instance of it.
method
astroid.rebuilder.TreeRebuilder.visit_starred(node:ast.Starred, parent:nodes.NodeNG) -> nodes.StarredVisit a Starred node and return a new instance of it.
method
astroid.rebuilder.TreeRebuilder.visit_try(node:ast.Try, parent:nodes.NodeNG) -> nodes.TryVisit a Try node by returning a fresh instance of it
method
astroid.rebuilder.TreeRebuilder.visit_tuple(node:ast.Tuple, parent:nodes.NodeNG) -> nodes.TupleVisit a Tuple node by returning a fresh instance of it.
method
astroid.rebuilder.TreeRebuilder.visit_typevar(node:ast.TypeVar, parent:nodes.NodeNG) -> nodes.TypeVarVisit a TypeVar node by returning a fresh instance of it.
method
astroid.rebuilder.TreeRebuilder.visit_unaryop(node:ast.UnaryOp, parent:nodes.NodeNG) -> nodes.UnaryOpVisit a UnaryOp node by returning a fresh instance of it.
method
astroid.rebuilder.TreeRebuilder.visit_while(node:ast.While, parent:nodes.NodeNG) -> nodes.WhileVisit a While node by returning a fresh instance of it.
method
astroid.rebuilder.TreeRebuilder.visit_yield(node:ast.Yield, parent:nodes.NodeNG) -> nodes.NodeNGVisit a Yield node by returning a fresh instance of it.
class
astroid.transforms.TransformVisitorA visitor for handling transforms.
class
astroid.util.BadBinaryOperationMessageObject which describes type errors for BinOps.
class
astroid.util.BadUnaryOperationMessageObject which describes operational failures on UnaryOps.
func
astroid.util.format_spec_too_large(format_spec:str) -> boolWhether a format spec asks for an oversized width or precision.
About this data
These signatures were extracted from the public source of pylint-dev/astroid
using Python's ast module. Argument names, default values,
type annotations and return types are taken verbatim from the code.
Implementation bodies are never stored. See
how it works for details.