Skip to content

Commit

Permalink
Fixes the redundant execution of string lowering function call (#3847)
Browse files Browse the repository at this point in the history
Co-authored-by: Sreeroop <[email protected]>
  • Loading branch information
sreeroo and sreeroo authored Nov 23, 2023
1 parent e6efb02 commit 1443bf3
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions bugbug/models/bugtype.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,17 +37,19 @@ def bug_to_types(
) -> list[str]:
types = set()

bug_whiteboard = bug["whiteboard"].lower()

if any(
f"{whiteboard_text}" in bug["whiteboard"].lower()
f"{whiteboard_text}" in bug_whiteboard
for whiteboard_text in ("overhead", "memshrink")
):
types.add("memory")

if "[power" in bug["whiteboard"].lower():
if "[power" in bug_whiteboard:
types.add("power")

if any(
f"[{whiteboard_text}" in bug["whiteboard"].lower()
f"[{whiteboard_text}" in bug_whiteboard
for whiteboard_text in (
"fxperf",
"fxperfsize",
Expand Down

0 comments on commit 1443bf3

Please sign in to comment.