diff --git a/material/plugins/privacy/plugin.py b/material/plugins/privacy/plugin.py index 779c6751136..6875420f93c 100644 --- a/material/plugins/privacy/plugin.py +++ b/material/plugins/privacy/plugin.py @@ -247,7 +247,7 @@ def _parse_fragment(self, fragment: str): # Parse and extract all external assets from a media file using a preset # regular expression, and return all URLs found. - def _parse_media(self, initiator: File) -> "list[URL]": + def _parse_media(self, initiator: File) -> list[URL]: _, extension = posixpath.splitext(initiator.dest_uri) if extension not in self.assets_expr_map: return [] diff --git a/material/plugins/search/plugin.py b/material/plugins/search/plugin.py index 22cd6d21541..a3199ab92a8 100644 --- a/material/plugins/search/plugin.py +++ b/material/plugins/search/plugin.py @@ -312,9 +312,9 @@ class Element: """ # Initialize HTML element - def __init__(self, tag, attrs = {}): + def __init__(self, tag, attrs = None): self.tag = tag - self.attrs = attrs + self.attrs = attrs or {} # String representation def __repr__(self):