Implements the @attr.define decorator. See https://www.attrs.org/en/stable/api.html#next-generation-apis
Class Method | make |
Create a PyTDFunction. |
Method | _handle |
Undocumented |
Constant | _DEFAULT |
Undocumented |
Inherited from Attrs
:
Class Method | from |
Undocumented |
Class Method | make |
Undocumented |
Method | decorate |
Processes the attrib members of a class. |
Method | init |
Attribute name as an __init__ keyword, could differ from attr.name. |
Method | to |
Undocumented |
Inherited from Decorator
(via Attrs
):
Method | __init__ |
Initialize a SimpleValue. |
Method | call |
Construct a decorator, and call it on the class. |
Method | get |
Undocumented |
Method | make |
Undocumented |
Method | set |
Set current_args when constructing a class directly. |
Method | update |
Update current_args with the Args passed to the decorator. |
Instance Variable | args |
Undocumented |
Instance Variable | partial |
Undocumented |
Instance Variable | _current |
Undocumented |
Inherited from PyTDFunction
(via Attrs
, Decorator
):
Method | argcount |
Returns the minimum number of arguments needed for a call. |
Method | property |
Bind this value to the given self or cls. |
Method | set |
Attempts to set default arguments for a function's signatures. |
Instance Variable | bound |
Undocumented |
Instance Variable | kind |
Undocumented |
Instance Variable | module |
Undocumented |
Instance Variable | signatures |
Undocumented |
Method | _call |
Perform a function call that involves multiple signatures. |
Method | _can |
Undocumented |
Method | _combine |
Combines multiple return types. |
Method | _get |
Mutation for making all type parameters in a list of instances "unknown". |
Method | _log |
Log the argument values. |
Method | _match |
Undocumented |
Instance Variable | _mutated |
Undocumented |
Instance Variable | _return |
Undocumented |
Instance Variable | _signature |
Undocumented |
Inherited from Function
(via Attrs
, Decorator
, PyTDFunction
):
Method | __repr__ |
Undocumented |
Method | match |
Check whether the given arguments can match the function signature. |
Instance Variable | cls |
Undocumented |
Instance Variable | is |
Undocumented |
Instance Variable | is |
Undocumented |
Instance Variable | is |
Undocumented |
Instance Variable | is |
Undocumented |
Method | _extract |
Extracts defaults from a Variable, used by set_function_defaults. |
Method | _get |
Get the python variable name of a pytype Variable. |
Inherited from SimpleValue
(via Attrs
, Decorator
, PyTDFunction
, Function
):
Method | cls |
Undocumented |
Method | get |
Undocumented |
Method | get |
Get a cfg.Variable of the instance's values for the type parameter. |
Method | get |
Build a key from the information used to perform type matching. |
Method | has |
Check if the key is in `instance_type_parameters`. |
Method | instantiate |
Create an instance of self. |
Method | maybe |
Undocumented |
Method | merge |
Set the value of a type parameter. |
Method | set |
Set the __class__ of an instance, for code that does "x.__class__ = y. |
Method | update |
Undocumented |
Instance Variable | members |
Undocumented |
Property | instance |
Undocumented |
Property | maybe |
Undocumented |
Method | _call |
Undocumented |
Method | _get |
Undocumented |
Method | _get |
Undocumented |
Method | _unique |
Get unique parameter subtypes as variables. |
Instance Variable | _cached |
Undocumented |
Instance Variable | _cls |
Undocumented |
Instance Variable | _fullhash |
Undocumented |
Instance Variable | _instance |
Undocumented |
Instance Variable | _maybe |
Undocumented |
Instance Variable | _type |
Undocumented |
Inherited from BaseValue
(via Attrs
, Decorator
, PyTDFunction
, Function
, SimpleValue
):
Method | compute |
Undocumented |
Method | default |
Undocumented |
Method | get |
Undocumented |
Method | get |
Gets a default type key. See get_type_key. |
Method | get |
Get the class's type for the type parameter. |
Method | get |
Get the type an instance of us would have. |
Method | get |
Get this value's __new__ method, if it isn't object.__new__. |
Method | get |
Fetch a special attribute (e.g., __get__, __iter__). |
Method | has |
Return True if this is a function and has a **kwargs parameter. |
Method | has |
Return True if this is a function and has a *args parameter. |
Method | init |
Allow metaprogramming via __init_subclass__. |
Method | is |
Undocumented |
Method | module |
Undocumented |
Method | official |
Undocumented |
Method | register |
Treating self as a class definition, register an instance of it. |
Method | should |
Undocumented |
Method | to |
Undocumented |
Method | to |
Undocumented |
Method | to |
Get a PyTD definition for this object. |
Method | to |
Get a PyTD type representing this object, as seen at a node. |
Method | to |
Build a variable out of this abstract value. |
Method | unique |
Get unique parameter subtypes as bindings. |
Method | update |
Update the official name. |
Class Variable | formal |
Undocumented |
Instance Variable | final |
Undocumented |
Instance Variable | from |
Undocumented |
Instance Variable | is |
Undocumented |
Instance Variable | is |
Undocumented |
Instance Variable | mro |
Undocumented |
Instance Variable | name |
Undocumented |
Instance Variable | slots |
Undocumented |
Property | all |
Undocumented |
Property | full |
Undocumented |
Property | official |
Undocumented |
Property | template |
Undocumented |
Instance Variable | _all |
Undocumented |
Instance Variable | _instance |
Undocumented |
Instance Variable | _module |
Undocumented |
Instance Variable | _official |
Undocumented |
Instance Variable | _template |
Undocumented |
Inherited from ContextWeakrefMixin
(via Attrs
, Decorator
, PyTDFunction
, Function
, SimpleValue
, BaseValue
):
Class Variable | __slots__ |
Undocumented |
Instance Variable | ctx |
Undocumented |
Property | ctx |
Undocumented |
pytype.overlays.attr_overlay.Attrs.make
Create a PyTDFunction. Args: name: The function name. ctx: The abstract context. module: The module that the function is in. pyval: Optionally, the pytd.Function object to use. Otherwise, it is fetched from the loader. pyval_name: Optionally, the name of the pytd.Function object to look up, if it is different from the function name. Returns: A new PyTDFunction.