pynenc.arguments

Module Contents

Classes

Arguments

Represents a distinctive set of arguments used in a task call.

API

class pynenc.arguments.Arguments(kwargs: Optional[pynenc.types.Args] = None, *, app: Optional[pynenc.Pynenc] = None)[source]

Represents a distinctive set of arguments used in a task call.

This class facilitates the handling of arguments by providing functionalities such as generating a unique identifier for a set of arguments, and supporting hashability and equality checks.

Parameters:

kwargs (Optional[Args]) – Keyword arguments to initialize the Arguments object. Defaults to an empty dictionary if None is provided.

Initialization

classmethod from_call(func: pynenc.types.Func, *args: Any, **kwargs: Any) pynenc.arguments.Arguments[source]

Creates an Arguments object from a function call.

It uses inspect.signature to determine the function’s signature and binds the provided arguments to it.

Parameters:
  • func (Func) – The function whose arguments are to be processed.

  • args (Any) – Positional arguments of the function call.

  • kwargs (Any) – Keyword arguments of the function call.

Returns:

An instance of Arguments representing the arguments of the call.

abstractmethod __eq__(__value: object) bool[source]
_format_value(conf: pynenc.conf.config_pynenc.ConfigPynenc, value: Any) str[source]

Format a single argument value based on configuration.

__str__() str[source]