diff options
author | crupest <crupest@outlook.com> | 2022-11-28 17:35:11 +0800 |
---|---|---|
committer | crupest <crupest@outlook.com> | 2022-11-28 17:35:11 +0800 |
commit | b94c598e54ddcc712556ec115355816b5564b522 (patch) | |
tree | 500c7d1a1c44111f3ec5db7b3a230283597d268c /tool/modules/config.py | |
parent | 4d84b3e9e4ab82ad39b1cc5e08d3d580bd92a728 (diff) | |
download | crupest-b94c598e54ddcc712556ec115355816b5564b522.tar.gz crupest-b94c598e54ddcc712556ec115355816b5564b522.tar.bz2 crupest-b94c598e54ddcc712556ec115355816b5564b522.zip |
Add aio dns.
Diffstat (limited to 'tool/modules/config.py')
-rw-r--r-- | tool/modules/config.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/tool/modules/config.py b/tool/modules/config.py index 28b09a3..b9ad818 100644 --- a/tool/modules/config.py +++ b/tool/modules/config.py @@ -1,18 +1,19 @@ import pwd import grp import os +import typing from rich.prompt import Prompt from .path import config_file_path class ConfigVar: - def __init__(self, name: str, description: str, default_value_generator, /, default_value_for_ask=None): + def __init__(self, name: str, description: str, default_value_generator: typing.Callable[[], str] | str, /, default_value_for_ask=str | None): """Create a config var. Args: name (str): The name of the config var. description (str): The description of the config var. - default_value_generator (typing.Callable([], str) | str): The default value generator of the config var. If it is a string, it will be used as the input prompt and let user input the value. + default_value_generator (typing.Callable[[], str] | str): The default value generator of the config var. If it is a string, it will be used as the input prompt and let user input the value. """ self.name = name self.description = description |