Files
ServerSync/lib/invoke/__pycache__/executor.cpython-314.pyc

120 lines
9.1 KiB
Plaintext
Raw Normal View History

2026-02-12 02:28:23 +02:00
+
t<10>i<EFBFBD>"<00><00><><00>^RIHtHtHtHtHtHtHt^RIH t ^RI
H t ^RI H t ^RIHtHt]'d^RIHt^RIHt^RI
Ht!R R
4tR #) <0C>)<07> TYPE_CHECKING<4E>Any<6E>Dict<63>List<73>Optional<61>Tuple<6C>Union)<01>Config)<01> ParserContext)<01>debug)<02>Call<6C>Task)<01>
Collection)<01>Result)<01> ParseResultc<00><>a<00>]tRt^toRtRV3RlRlltV3RlRltV3RlRltV3R lR
ltV3R lR lt R t
Vt R#)<0F>Executorz<72>
An execution strategy for Task objects.
Subclasses may override various extension points to change, add or remove
behavior.
.. versionadded:: 1.0
Nc<00>J<<01>V^8<>dQhRRRS[R,RS[R,RR/#) <09><00>
collectionr<00>configr
<00>corer<00>returnN)r)<02>format<61> __classdict__s"<22><>6/tmp/pip-target-zhdecbcm/lib/python/invoke/executor.py<70> __annotate__<5F>Executor.__annotate__s=<00><><00><19><19> <20><19><19><18>"<22><19><17>}<7D>%<25> <19>
<0E> <19>c <0C>H<00>WnVeTM \4VnW0nR#)a<>
Initialize executor with handles to necessary data structures.
:param collection:
A `.Collection` used to look up requested tasks (and their default
config data, if any) by name during execution.
:param config:
An optional `.Config` holding configuration state. Defaults to an
empty `.Config` if not given.
:param core:
An optional `.ParseResult` holding parsed core program arguments.
Defaults to ``None``.
N)rr
rr)<04>selfrrrs&&&&r<00>__init__<5F>Executor.__init__s<00><00>*%<25><0F> &<26> 2<>f<EFBFBD><06><08><04> <0B><18> rc<00>z<<01>V^8<>dQhRS[S[S[S[S[S[S[3,3,S[3,RS[R,/#)r<00>tasksr)rr)r <00>strrrrr )rrs"<22>rrr1sE<00><><00>a<17>a<17><1B>C<EFBFBD><15>s<EFBFBD>D<EFBFBD><13>c<EFBFBD><18>N<EFBFBD>':<3A>!;<3B>]<5D>J<>K<>a<17> <0A><1E> <1F>arc <0C><><00>\RPVUu.uFq"NK up44VPV4p\RPV44\V4pVP V4pVP
P PpV'dVPV4MTp/pVF<>pW<>9;'d VPp \RPV44VP
p
VPPVP4p V
PV 4V
P4\R4VPV
4p V .VP O5p VP"!V /VP$BpV 'd \'V4W<>VP"&K<> V#uupi \dRpEL*i;i)a<>
Execute one or more ``tasks`` in sequence.
:param tasks:
An all-purpose iterable of "tasks to execute", each member of which
may take one of the following forms:
**A string** naming a task from the Executor's `.Collection`. This
name may contain dotted syntax appropriate for calling namespaced
tasks, e.g. ``subcollection.taskname``. Such tasks are executed
without arguments.
**A two-tuple** whose first element is a task name string (as
above) and whose second element is a dict suitable for use as
``**kwargs`` when calling the named task. E.g.::
[
('task1', {}),
('task2', {'arg1': 'val1'}),
...
]
is equivalent, roughly, to::
task1()
task2(arg1='val1')
**A `.ParserContext`** instance, whose ``.name`` attribute is used
as the task name and whose ``.as_kwargs`` attribute is used as the
task kwargs (again following the above specifications).
.. note::
When called without any arguments at all (i.e. when ``*tasks``
is empty), the default task from ``self.collection`` is used
instead, if defined.
:returns:
A dict mapping task objects to their return values.
This dict may include pre- and post-tasks if any were executed. For
example, in a collection with a ``build`` task depending on another
task named ``setup``, executing ``build`` will result in a dict
with two keys, one for ``build`` and one for ``setup``.
.. versionadded:: 1.0
zExamining top level tasks {!r}z#Tasks (now Calls) with kwargs: {!r}TzExecuting {!r}z/Finished loading collection & shell env configs)r r<00> normalize<7A>list<73> expand_callsrr%<00>dedupe<70>AttributeError<6F> autoprintr<00> configuration<6F> called_as<61>load_collection<6F>load_shell_env<6E> make_context<78>args<67>task<73>kwargs<67>print)r!r%<00>x<>calls<6C>direct<63>expandedr+<00>results<74>callr-r<00>collection_config<69>contextr3<00>results&* r<00>execute<74>Executor.execute1s<><00><00>d <0E>.<2E>5<>5<>%<25>6H<36>%<25>Q<EFBFBD>q<EFBFBD>%<25>6H<36>I<>J<><14><0E><0E>u<EFBFBD>%<25><05> <0A>3<>:<3A>:<3A>5<EFBFBD>A<>B<><16>e<EFBFBD><1B><06><18>$<24>$<24>U<EFBFBD>+<2B><08> <1A><19>[<5B>[<5B>&<26>&<26>-<2D>-<2D>F<EFBFBD>*0<><04> <0B> <0B>H<EFBFBD>%<25>X<EFBFBD><05><14><07><1A>D<EFBFBD><1C><0E>9<>9<>4<EFBFBD>><3E>><3E>I<EFBFBD> <11>"<22>)<29>)<29>$<24>/<2F> 0<><1A>[<5B>[<5B>F<EFBFBD>
!%<25><0F><0F> =<3D> =<3D>d<EFBFBD>n<EFBFBD>n<EFBFBD> M<> <1D> <12> "<22> "<22>#4<> 5<> <12> !<21> !<21> #<23> <11>C<> D<><1B>'<27>'<27><06>/<2F>G<EFBFBD><1B>(<28>d<EFBFBD>i<EFBFBD>i<EFBFBD>(<28>D<EFBFBD><19>Y<EFBFBD>Y<EFBFBD><04>4<><04> <0B> <0B>4<>F<EFBFBD><18><15>f<EFBFBD> <0A>"(<28>D<EFBFBD>I<EFBFBD>I<EFBFBD> <1E>1<1A>2<17><0E><>_7I<01><><1E> <1A><19>F<EFBFBD> <1A>s<00>
F' <0C>2 F,<00>, F=<03><F=c <00><><<01>V^8<>dQhRS[S[S[S[S[S[S[S[3,3,S[3,R3,RS[R,/#)rr%.rr )rr r&rrr r)rrs"<22>rrr<00>sN<00><><00><15><15><14> <11>#<23>u<EFBFBD>S<EFBFBD>$<24>s<EFBFBD>C<EFBFBD>x<EFBFBD>.<2E>0<>1<>=<3D>@<40> A<>3<EFBFBD> F<>
<EFBFBD><15>
<0E>f<EFBFBD><1C> rc <0C><><00>.pVF<>p\V\4'dTp/pM3\V\4'dVPpVPpMVwrE\ VP V,WTR7pVPV4K<> V'gJVP Pe2\ VP VP P,4.pV#)z<>
Transform arbitrary task list w/ various types, into `.Call` objects.
See docstring for `~.Executor.execute` for details.
.. versionadded:: 1.0
)r5r/) <09>
isinstancer&r <00>name<6D> as_kwargsr r<00>append<6E>default)r!r%r8r4rEr5<00>cs&& rr(<00>Executor.normalize<7A>s<><00><00><13><05><19>D<EFBFBD><19>$<24><03>$<24>$<24><1B><04><1B><06><1B>D<EFBFBD>-<2D>0<>0<><1B>y<EFBFBD>y<EFBFBD><04><1D><1E><1E><06>#<23> <0C><04><14>T<EFBFBD>_<EFBFBD>_<EFBFBD>T<EFBFBD>*<2A>6<EFBFBD>J<>A<EFBFBD> <11>L<EFBFBD>L<EFBFBD><11>O<EFBFBD><1A><15><14><1F><1F>0<>0<><<3C><19>$<24>/<2F>/<2F>$<24>/<2F>/<2F>*A<>*A<>B<>C<>D<>E<EFBFBD><14> rc<00>B<<01>V^8<>dQhRS[R,RS[R,/#<00>rr8r r<00>r)rrs"<22>rrr<00>s#<00><><00><17><17>D<EFBFBD><16>L<EFBFBD><17>T<EFBFBD>&<26>\<5C>rc <0C><><00>.p\R4VFPpW29d.\RPV44VPV4K6\RPV44KR V#)z<>
Deduplicate a list of `tasks <.Call>`.
:param calls: An iterable of `.Call` objects representing tasks.
:returns: A list of `.Call` objects.
.. versionadded:: 1.0
zDeduplicating tasks...z{!r}: no duplicates found, okz%{!r}: found in list already, skipping)r rrG)r!r8<00>dedupedr<s&& rr+<00>Executor.dedupe<70>s]<00><00><15><07> <0A>&<26>'<27><19>D<EFBFBD><13>"<22><15>5<><<3C><<3C>T<EFBFBD>B<>C<><17><0E><0E>t<EFBFBD>$<24><15>=<3D>D<>D<>T<EFBFBD>J<>K<> <1A> <17>rc<00>B<<01>V^8<>dQhRS[R,RS[R,/#rLrM)rrs"<22>rrr<00>s#<00><><00><13><13>$<24>v<EFBFBD>,<2C><13>4<EFBFBD><06><<3C>rc <0C>\<00>.pVF<>p\V\4'd \V4p\RP V44VP VP VP44VPV4VP VP VP44K<> V#)ao
Expand a list of `.Call` objects into a near-final list of same.
The default implementation of this method simply adds a task's
pre/post-task list before/after the task itself, as necessary.
Subclasses may wish to do other things in addition (or instead of) the
above, such as multiplying the `calls <.Call>` by argument vectors or
similar.
.. versionadded:: 1.0
zExpanding task-call {!r})
rDrr r r<00>extendr*<00>prerG<00>post)r!r8<00>retr<s&& rr*<00>Executor.expand_calls<6C>s<><00><00><11><03><19>D<EFBFBD><1A>$<24><04>%<25>%<25><1B>D<EFBFBD>z<EFBFBD><04> <11>,<2C>3<>3<>D<EFBFBD>9<> :<3A> <10>J<EFBFBD>J<EFBFBD>t<EFBFBD>(<28>(<28><14><18><18>2<> 3<> <0F>J<EFBFBD>J<EFBFBD>t<EFBFBD> <1C> <0F>J<EFBFBD>J<EFBFBD>t<EFBFBD>(<28>(<28><14><19><19>3<> 4<>!<1A>"<13>
r)rrr)NN) <0C>__name__<5F>
__module__<EFBFBD> __qualname__<5F>__firstlineno__<5F>__doc__r"r@r(r+r*<00>__static_attributes__<5F>__classdictcell__)rs@rrrs?<00><><00><00><08><19><19>2a<17>a<17>F<15><15><<17><17>(<13>rrN)<17>typingrrrrrrr rr
<00>parserr <00>utilr r%r rrr<00>runnersrrr<00>rr<00><module>rds2<00><01>I<>I<>I<><1A>!<21><17><1D><10>&<26><1F>#<23>W<13>Wr