I ran DeepSource analysis on my fork of the repo, and found some interesting code quality and performance issues that can improve the general code quality and performance here.
This PR fixes a few of the issues detected.
Summary of changes
Use sys.exit() calls instead of dangerous bare exit().
Simplify if statements.
Remove unnecessary use of comprehensions.
Use identity check for comparison with True/False.
Add .deepsource.toml file for continuous analysis on bug risks/performance/code-quality issues on new changes.
Description
I ran DeepSource analysis on my fork of the repo, and found some interesting code quality and performance issues that can improve the general code quality and performance here. This PR fixes a few of the issues detected.
Summary of changes
sys.exit()
calls instead of dangerous bareexit()
.if
statements..deepsource.toml
file for continuous analysis on bug risks/performance/code-quality issues on new changes.