Skip to content

Commit

Permalink
fix: remove unused get_json_dict_path (#100)
Browse files Browse the repository at this point in the history
  • Loading branch information
geertmeersman authored Dec 21, 2023
2 parents 7f7ee4d + 7dbd686 commit a214aca
Showing 1 changed file with 0 additions and 11 deletions.
11 changes: 0 additions & 11 deletions custom_components/nexxtmove/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@

import re

from jsonpath import jsonpath


def str_to_float(input) -> float:
"""Transform float to string."""
Expand Down Expand Up @@ -50,15 +48,6 @@ def sizeof_fmt(num, suffix="b"):
return f"{num:.1f}Yi{suffix}"


def get_json_dict_path(dictionary, path):
"""Fetch info based on jsonpath from dict."""
# log_debug(f"[get_json_dict_path] Path: {path}, Dict: {dictionary}")
json_dict = jsonpath(dictionary, path)
if isinstance(json_dict, list):
json_dict = json_dict[0]
return json_dict


def mask_fields(json_data, fields_to_mask):
"""Mask sensitive fields."""
if isinstance(json_data, dict):
Expand Down

0 comments on commit a214aca

Please sign in to comment.