gtg
gtg copied to clipboard
Fix an inappropriate test expression to remove a logical short circuit
In file: main_window.py, the comparison of Collection length creates a logical short circuit. I suggested that the Collection length comparison should be done without creating a logical short circuit.
Sponsorship and Support:
This work is done by the security researchers from OpenRefactory and is supported by the Open Source Security Foundation (OpenSSF): Project Alpha-Omega. Alpha-Omega is a project partnering with open source software project maintainers to systematically find new, as-yet-undiscovered vulnerabilities in open source code - and get them fixed – to improve global software supply chain security.
The bug is found by running the Intelligent Code Repair (iCR) tool by OpenRefactory and then manually triaging the results.
The change itself looks good to me (I doubt that len()
here will return a negative value, and untested), but the commit message is a bit too generic. Could it be a bit more specific? Like "Remove tautology regarding selected tags filter" or something.
@munahaf Could you use git rebase -i
onto the latest version of our master branch, to reword your commit message as per the feedback above?
@sqatx might be interested in this too.
Related:
- #992
- #999
Agree with @Neui , len()
never returns a negative unless you implement the dunder method yourself and call it manually like tags.__len__()
Changed the commit message per suggestion.
@munahaf, sorry for pushing here and un-drafting. I'm trying to get things in faster :) Thanks for the work!