1
Fork 0
mirror of https://github.com/RGBCube/JsonWrapper synced 2025-07-27 11:47:45 +00:00

Update json_wrapper.py

This commit is contained in:
RGBCube 2022-01-28 20:08:59 +03:00 committed by GitHub
parent 30d89fe9b1
commit 0e4a172b8a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -95,7 +95,7 @@ class _PathMagic:
main_dict (dict): The dict to get the value of the key in. main_dict (dict): The dict to get the value of the key in.
path (Union[str, List[str]]): The path to follow. path (Union[str, List[str]]): The path to follow.
key (str): The key to get the value of. key (str): The key to get the value of.
default ([type], optional): The value to return if the key is not found. Defaults to None. default (Any, optional): The value to return if the key is not found. Defaults to None.
Returns: Returns:
Any: The value of the key. Will return the default kwarg if the key is not found. Any: The value of the key. Will return the default kwarg if the key is not found.
@ -188,7 +188,7 @@ class JsonWrapper:
Args: Args:
key (str): The key for the key value pair. key (str): The key for the key value pair.
value ([type]): The value for the key value pair. value (Any): The value for the key value pair.
pathmagic (Union[str, List[str]], optional): The path to follow. Defaults to "". pathmagic (Union[str, List[str]], optional): The path to follow. Defaults to "".
""" """
self.json.validate() self.json.validate()
@ -208,7 +208,7 @@ class JsonWrapper:
Args: Args:
key (str): The key to get the value of. key (str): The key to get the value of.
default ([type], optional): The value to return if the key is not found. Defaults to None. default (Any, optional): The value to return if the key is not found. Defaults to None.
pathmagic (Union[str, List[str]], optional): The path to follow. Defaults to "". pathmagic (Union[str, List[str]], optional): The path to follow. Defaults to "".
Returns: Returns: