Skip to content

Commit

Permalink
Add Script docstring
Browse files Browse the repository at this point in the history
  • Loading branch information
kmazurek committed Sep 2, 2021
1 parent 3386271 commit f503432
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 7 deletions.
15 changes: 12 additions & 3 deletions yapapi/script/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
"""Stuff."""

import asyncio
from datetime import timedelta
from typing import Any, Awaitable, Callable, Dict, Optional, List, Tuple, TYPE_CHECKING
Expand Down Expand Up @@ -27,7 +25,18 @@


class Script:
"""Stuff."""
"""Represents a series of commands to be executed on a provider node.
New commands are added to the script either through its `add` method or by calling one of the
convenience methods provided (for example: `run` or `send_json`).
Adding a new command *does not* result in it being immediately executed. Once ready, a `Script`
instance is meant to be yielded from a worker function (work generator pattern).
Commands will be run in the order in which they were added to the script.
If the `WorkContext` instance this `Script` uses has the field `_implicit_init` set to `True`,
the first script to be yielded is going to prepend the user's commands with `Deploy` and
`Start` commands.
"""

timeout: Optional[timedelta] = None
"""Time after which this script's execution should be forcefully interrupted."""
Expand Down
2 changes: 0 additions & 2 deletions yapapi/script/capture.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
"""Stuff."""

from dataclasses import dataclass
import enum
from typing import Dict, Optional
Expand Down
2 changes: 0 additions & 2 deletions yapapi/script/command.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
"""Stuff."""

import abc
from functools import partial
import json
Expand Down

0 comments on commit f503432

Please sign in to comment.