j7i dZddlmZddlmZddlmZddlmZddlmZddlm Z ddlm Z dd lm Z e e eee efZe d ZGd d eZeGd de eZeZy)z" Hook wrapper "result" utilities. ) annotations) TracebackType)Callable)cast)final)Generic)Optional)TypeVar ResultTypeceZdZdZy) HookCallErrorzHook was called incorrectly.N)__name__ __module__ __qualname____doc__W/mnt/ssd/data/python-lab/ChefSystem/venv/lib/python3.12/site-packages/pluggy/_result.pyr r s&rr cveZdZdZdZ d dZed dZed dZe ddZ ddZ ddZ dd Z y )ResultzYAn object used to inspect and set the result in a :ref:`hook wrapper `._result _exception _tracebackcV||_||_||j|_yd|_y:meta private:Nrr __traceback__r)selfresult exceptions r__init__zResult.__init__s+  #5>5J)11PTrcP|j}|yt|||jfSr)rtyper)r excs rexcinfozResult.excinfo*s*oo ;IsDOO4 4rc|jS)r)r)r s rr"zResult.exception3src`d}dx}} |}|||S#t$r }|}Yd}~d}~wwxYw)rTN) BaseException)clsfunc__tracebackhide__r!r"r&s r from_callzResult.from_call8sF!!! VF69%% I s -(-c.||_d|_d|_y)a,Force the result(s) to ``result``. If the hook was marked as a ``firstresult`` a single value should be set, otherwise set a (modified) list of results. Any exceptions found during invocation will be deleted. This overrides any previous result or exception. Nr)r r!s r force_resultzResult.force_resultCs rcVd|_||_||j|_yd|_y)zForce the result to fail with ``exception``. This overrides any previous result or exception. .. versionadded:: 1.1.0 Nr)r r"s rforce_exceptionzResult.force_exceptionPs+ #5>5J)11PTrcd}|j}|j}|tt|jS|j |)zGet the result(s) for this hook call. If the hook was marked as a ``firstresult`` only a single value will be returned, otherwise a list of results. T)rrrr rwith_traceback)r r-r&tbs r get_resultzResult.get_result[sC !oo __ ; DLL1 1$$R( (rN)r!zResultType | Noner"BaseException | NonereturnNone)r8z_ExcInfo | None)r8r7)r,zCallable[[], ResultType]r8zResult[ResultType])r!r r8r9)r"r*r8r9)r8r )rrrr __slots__r#propertyr'r" classmethodr.r0r2r6rrrrrs8I U! U( U  U55&&  U )rrN)r __future__rtypesrtypingrrrrr r tupler%r*_ExcInfor Exceptionr r_ResultrrrrDs# m$mXm5LL M \ " 'I'N)WZ N)N)d r