add utils.SensitiveSetting, to .format() hide value
This commit is contained in:
parent
ba0911f2e7
commit
d950eb3660
1 changed files with 4 additions and 0 deletions
|
@ -355,6 +355,10 @@ class FunctionSetting(Setting):
|
||||||
def parse(self, value: str) -> typing.Any:
|
def parse(self, value: str) -> typing.Any:
|
||||||
return self._func(value)
|
return self._func(value)
|
||||||
|
|
||||||
|
class SensitiveSetting(Setting):
|
||||||
|
def format(self, value: typing.Any):
|
||||||
|
return "*"*16
|
||||||
|
|
||||||
class DeadlineExceededException(Exception):
|
class DeadlineExceededException(Exception):
|
||||||
pass
|
pass
|
||||||
def _raise_deadline():
|
def _raise_deadline():
|
||||||
|
|
Loading…
Reference in a new issue