Skip to content

Commit

Permalink
update the function where missing
Browse files Browse the repository at this point in the history
  • Loading branch information
firstof9 committed Jul 21, 2021
1 parent f8630cc commit 17fd86e
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions custom_components/mail_and_packages/config_flow.py
Original file line number Diff line number Diff line change
Expand Up @@ -147,9 +147,9 @@ def _get_schema_step_1(hass: Any, user_input: list, default_dict: list) -> Any:
if user_input is None:
user_input = {}

def _get_default(key):
def _get_default(key: str, fallback_default: Any = None) -> None:
"""Gets default value for key."""
return user_input.get(key, default_dict.get(key))
return user_input.get(key, default_dict.get(key, fallback_default))

return vol.Schema(
{
Expand Down Expand Up @@ -215,9 +215,9 @@ def _get_schema_step_3(
if user_input is None:
user_input = {}

def _get_default(key):
def _get_default(key: str, fallback_default: Any = None) -> None:
"""Gets default value for key."""
return user_input.get(key, default_dict.get(key))
return user_input.get(key, default_dict.get(key, fallback_default))

return vol.Schema(
{
Expand Down

0 comments on commit 17fd86e

Please sign in to comment.