Skip to content

Commit

Permalink
Removed unnecessary dict() constructor around dict literal
Browse files Browse the repository at this point in the history
  • Loading branch information
sisp committed Dec 18, 2023
1 parent f348f6e commit 7931d88
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions src/overrides/hooks/translations.py
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ def on_page_markdown(markdown: str, *, page: Page, config: MkDocsConfig, files):
# -----------------------------------------------------------------------------

# Map ISO 639-1 (languages) to ISO 3166 (countries)
countries = dict({
countries = {
"af": "za",
"az": "az",
"ar": "ae",
Expand Down Expand Up @@ -191,4 +191,4 @@ def on_page_markdown(markdown: str, *, page: Page, config: MkDocsConfig, files):
"zh": "cn",
"zh-Hant": "cn",
"zh-TW": "tw"
})
}
8 changes: 4 additions & 4 deletions src/plugins/privacy/plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,11 +62,11 @@ def on_config(self, config):

# Initialize collections of external assets
self.assets = Files([])
self.assets_expr_map = dict({
self.assets_expr_map = {
".css": r"url\((\s*http?[^)]+)\)",
".js": r"[\"'](http[^\"']+\.(?:css|js(?:on)?))[\"']",
**self.config.assets_expr_map
})
}

# Process external style sheets and scripts (run latest) - run this after
# all other plugins, so they can add additional assets
Expand Down Expand Up @@ -537,7 +537,7 @@ def _save_to_file(self, path: str, content: str | bytes):
log = logging.getLogger("mkdocs.material.privacy")

# Expected file extensions
extensions = dict({
extensions = {
"application/javascript": ".js",
"image/avif": ".avif",
"image/gif": ".gif",
Expand All @@ -547,4 +547,4 @@ def _save_to_file(self, path: str, content: str | bytes):
"image/webp": ".webp",
"text/javascript": ".js",
"text/css": ".css"
})
}
4 changes: 2 additions & 2 deletions src/plugins/social/plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -491,7 +491,7 @@ def _load_font_from_google(self, name):
log.addFilter(DuplicateFilter())

# Color palette
colors = dict({
colors = {
"red": { "fill": "#ef5552", "text": "#ffffff" },
"pink": { "fill": "#e92063", "text": "#ffffff" },
"purple": { "fill": "#ab47bd", "text": "#ffffff" },
Expand All @@ -513,4 +513,4 @@ def _load_font_from_google(self, name):
"blue-grey": { "fill": "#546d78", "text": "#ffffff" },
"black": { "fill": "#000000", "text": "#ffffff" },
"white": { "fill": "#ffffff", "text": "#000000" }
})
}

0 comments on commit 7931d88

Please sign in to comment.