Skip to content

Commit 2b890ea

Browse files
committed
Simplify dict checks
RUF019: 'Unnecessary key check before dictionary access'
1 parent d35c8b3 commit 2b890ea

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/briefcase/platforms/web/static.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -278,7 +278,7 @@ def _handle_legacy_css(
278278
target = "static/css/briefcase.css"
279279
insert = "css"
280280
pkg_map = inserts.setdefault(target, {}).setdefault(insert, {})
281-
if contrib_key in pkg_map and pkg_map[contrib_key]:
281+
if pkg_map.get(contrib_key):
282282
pkg_map[contrib_key] += "\n" + css_text
283283
else:
284284
pkg_map[contrib_key] = css_text
@@ -321,7 +321,7 @@ def _handle_insert(
321321

322322
contrib_key = f"{package_key} (deploy insert: {rel_inside} from {path})"
323323
pkg_map = inserts.setdefault(target, {}).setdefault(insert, {})
324-
if contrib_key in pkg_map and pkg_map[contrib_key]:
324+
if pkg_map.get(contrib_key):
325325
pkg_map[contrib_key] += "\n" + text
326326
else:
327327
pkg_map[contrib_key] = text

0 commit comments

Comments
 (0)