Skip to content

Commit

Permalink
Add ResolutionSupport types and documentation (#8)
Browse files Browse the repository at this point in the history
  • Loading branch information
Cariad Eccleston authored Jan 16, 2021
1 parent 9f8e976 commit aadf0dd
Showing 1 changed file with 22 additions and 3 deletions.
25 changes: 22 additions & 3 deletions wev/sdk/resolution_support.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,27 @@


class ResolutionSupport:
"""
Helps plugins to resolve values.
Arguments:
confidential_prompt: A function for requesting runtime confidential
information from the user.
The first argument prescribes a short preamble, and
the second is the short prompt to print next to the
input cursor.
The function returns the user-entered string.
logger: Logger. Plugins should use this rather than
instantiate their own.
"""

def __init__(
self, logger: Logger, confidential_prompt: Callable[[str, str], str]
self,
confidential_prompt: Callable[[str, str], str],
logger: Logger,
) -> None:
self.logger = logger
self.confidential_prompt = confidential_prompt
self.logger: Logger = logger
self.confidential_prompt: Callable[[str, str], str] = confidential_prompt

0 comments on commit aadf0dd

Please sign in to comment.