Optimize the bug_to_types()
functions to avoid redundant the execution of string lowering
#3845
Labels
good-first-bug
Good for newcomers
The
bug["whiteboard"].lower()
statement is performed multiple times in the function. Instead, we could store the lowercase value in a variable (e.g.,bug_whiteboard
) and reuse it where needed.Examples:
bugbug/bugbug/models/bugtype.py
Line 46 in 0586c6a
bugbug/bugbug/models/bugtype.py
Line 50 in 0586c6a
The text was updated successfully, but these errors were encountered: