Skip to content

Commit 2f54a03

Browse files
Fix HIGH level code scanning alerts (#248)
* Fix HIGH level code scanning alert: replace locals() with explicit dict in set_style_flags() Agent-Logs-Url: https://github.com/fabiocaccamo/python-fontbro/sessions/87a964b2-9231-4d48-b37e-60ea1e5867e3 Co-authored-by: fabiocaccamo <1035294+fabiocaccamo@users.noreply.github.com> * Remove font binaries and JSON files changes from PR Agent-Logs-Url: https://github.com/fabiocaccamo/python-fontbro/sessions/cb1adcb7-df88-4f0e-beb7-ca200d1fc3c3 Co-authored-by: fabiocaccamo <1035294+fabiocaccamo@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: fabiocaccamo <1035294+fabiocaccamo@users.noreply.github.com>
1 parent 373d611 commit 2f54a03

1 file changed

Lines changed: 10 additions & 2 deletions

File tree

fontbro/font.py

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2103,8 +2103,16 @@ def set_style_flags(
21032103
:param extended: The extended style flag value
21042104
:type extended: bool or None
21052105
"""
2106-
flags = locals()
2107-
flags.pop("self")
2106+
flags = {
2107+
"regular": regular,
2108+
"bold": bold,
2109+
"italic": italic,
2110+
"underline": underline,
2111+
"outline": outline,
2112+
"shadow": shadow,
2113+
"condensed": condensed,
2114+
"extended": extended,
2115+
}
21082116
for key, value in flags.items():
21092117
if value is not None:
21102118
assert isinstance(value, bool)

0 commit comments

Comments
 (0)