Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Optimize the bug_to_types() functions to avoid redundant the execution of string lowering #3845

Closed
suhaibmujahid opened this issue Nov 22, 2023 · 3 comments · Fixed by #3847 or #3850
Closed
Labels
good-first-bug Good for newcomers

Comments

@suhaibmujahid
Copy link
Member

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:

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

f"[{whiteboard_text}" in bug["whiteboard"].lower()

@suhaibmujahid suhaibmujahid added the good-first-bug Good for newcomers label Nov 22, 2023
@sreeroo
Copy link
Contributor

sreeroo commented Nov 23, 2023

Hello @suhaibmujahid , Could I please work on this issue ?

@suhaibmujahid
Copy link
Member Author

Could I please work on this issue ?

@sreeroop10 Yes, you could work on any issue that does not have an open PR linked to it.

@suhaibmujahid
Copy link
Member Author

We still have one case, which was added in #3823 (after closing this issue):

f"[{whiteboard_text}" in bug["whiteboard"].lower()

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good-first-bug Good for newcomers
Projects
None yet
2 participants