diff options
| author | 2019-09-12 12:17:31 +0100 | |
|---|---|---|
| committer | 2019-09-12 12:17:31 +0100 | |
| commit | d950eb366024242288141c0a6e7fd9edf67300ee (patch) | |
| tree | 1b09f6e6cdc992fc250ae91819cf7d4f9c1d3dc3 | |
| parent | add utils.Setting.format() so subtypes can format differently (diff) | |
| signature | ||
add utils.SensitiveSetting, to .format() hide value
| -rw-r--r-- | src/utils/__init__.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/utils/__init__.py b/src/utils/__init__.py index edb7277a..a3a2342e 100644 --- a/src/utils/__init__.py +++ b/src/utils/__init__.py @@ -355,6 +355,10 @@ class FunctionSetting(Setting): def parse(self, value: str) -> typing.Any: return self._func(value) +class SensitiveSetting(Setting): + def format(self, value: typing.Any): + return "*"*16 + class DeadlineExceededException(Exception): pass def _raise_deadline(): |
