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

Addressing Sonar-found bugs and code smells. #2487

Merged
merged 5 commits into from
Jul 21, 2023
Merged

Conversation

nvoxland
Copy link
Contributor

@nvoxland nvoxland commented Jul 17, 2023

🚀 🚀 Pull Request

Impact

  • Bug fix (non-breaking change which fixes expected existing functionality)
  • Enhancement/New feature (adds functionality without impacting existing logic)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Code cleanup

Description

Working through "bug" and "code smell" sections of the sonar report.

The one "bug" was test_delete_and_commit() missing an assert

The rest were "code smells":

  • Variables in tests that were unneeded to set
  • Functions that define input/output types as something like str but are passed or return None, so I added Optional to type
  • Switched f"" strings to regular strings if there was no substitution
  • Don't use insecure http urls (this was in the security section)

Things to be aware of

Should not change functionality, just clean up code

Things to worry about

Nothing

Primarily:
- Unused variables
- Missing "Optional" in type definitions
@nvoxland nvoxland requested a review from artgish July 17, 2023 18:50
@nvoxland nvoxland removed the request for review from FayazRahman July 20, 2023 18:20
@nvoxland nvoxland merged commit aac3873 into main Jul 21, 2023
4 of 7 checks passed
@nvoxland nvoxland deleted the sonar-bugs-and-smells branch July 21, 2023 15:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants