Skip to content

Commit

Permalink
Add typing
Browse files Browse the repository at this point in the history
  • Loading branch information
bouwew committed Jan 30, 2025
1 parent a858f56 commit 2e04ce3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion plugwise/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ def get_vendor_name(module: etree, model_data: ModuleData) -> ModuleData:
return model_data


def parse_escapes(text):
def parse_escapes(text: str) -> str:
"""Helper-function for get_vendor_name()."""
fixed_escapes = re.sub(r'(?<!\\)(\\\\)*("|\\$)', r"\\\1\2", text)
return ast.literal_eval(f'"{fixed_escapes}"')
Expand Down

0 comments on commit 2e04ce3

Please sign in to comment.