[fix] Mypy CI

This commit is contained in:
ljf 2021-10-26 12:37:08 +02:00
parent a8c6b5e637
commit 4162557aac

View file

@ -191,7 +191,7 @@ def evaluate_simple_js_expression(expr, context={}):
class ConfigPanel: class ConfigPanel:
entity_type = "config" entity_type = "config"
save_path_tpl = None save_path_tpl: Union[str, None] = None
config_path_tpl = "/usr/share/yunohost/other/config_{entity_type}.toml" config_path_tpl = "/usr/share/yunohost/other/config_{entity_type}.toml"
save_mode = "full" save_mode = "full"
@ -705,7 +705,7 @@ class Question(object):
# .value is the "proposed" value which we got from the user # .value is the "proposed" value which we got from the user
self.value = question.get("value") self.value = question.get("value")
# Use to return several values in case answer is in mutipart # Use to return several values in case answer is in mutipart
self.values = {} self.values: Dict[str, Any] = {}
# Empty value is parsed as empty string # Empty value is parsed as empty string
if self.default == "": if self.default == "":
@ -1318,7 +1318,7 @@ ARGUMENTS_TYPE_PARSERS = {
def ask_questions_and_parse_answers( def ask_questions_and_parse_answers(
raw_questions: Dict, raw_questions: Dict,
prefilled_answers: Union[str, Mapping[str, Any]] = {}, prefilled_answers: Union[str, Mapping[str, Any]] = {},
current_values: Union[str, Mapping[str, Any]] = {}, current_values: Mapping[str, Any] = {},
hooks: Dict[str, Callable[[], None]] = {}, hooks: Dict[str, Callable[[], None]] = {},
) -> List[Question]: ) -> List[Question]:
"""Parse arguments store in either manifest.json or actions.json or from a """Parse arguments store in either manifest.json or actions.json or from a