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

Use enums for match types #341

Merged
merged 3 commits into from
Aug 2, 2024
Merged

Use enums for match types #341

merged 3 commits into from
Aug 2, 2024

Conversation

stveit
Copy link
Contributor

@stveit stveit commented Aug 2, 2024

Scope and purpose

Uses existing enum for different matching type instead of comparing against strings with exact same values as the enums.
Does not change any functionality, just clears up the code

Contributor Checklist

Every pull request should have this checklist filled out, no matter how small it is.
More information about contributing to Zino can be found in the
README.

  • Added a changelog fragment for towncrier
  • Added/amended tests for new/changed code
  • Added/changed documentation
  • Linted/formatted the code with black, ruff and isort, easiest by using pre-commit
  • The first line of the commit message continues the sentence "If applied, this commit will ...", starts with a capital letter, does not end with punctuation and is 50 characters or less long. See https://cbea.ms/git-commit/
  • If applicable: Created new issues if this PR does not fix the issue completely/there is further work to be done

@stveit stveit self-assigned this Aug 2, 2024
Copy link

github-actions bot commented Aug 2, 2024

🦙 MegaLinter status: ✅ SUCCESS

Descriptor Linter Files Fixed Errors Elapsed time
✅ PYTHON black 100 0 1.81s
✅ PYTHON isort 100 0 0.34s
✅ PYTHON ruff 100 0 0.03s

See detailed report in MegaLinter reports

MegaLinter is graciously provided by OX Security

Copy link

github-actions bot commented Aug 2, 2024

Test results

    3 files      3 suites   1m 17s ⏱️
  555 tests   555 ✅ 0 💤 0 ❌
1 617 runs  1 615 ✅ 2 💤 0 ❌

Results for commit 1218d52.

♻️ This comment has been updated with latest results.

Copy link

codecov bot commented Aug 2, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 98.20%. Comparing base (41a87dc) to head (1218d52).
Report is 3 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #341   +/-   ##
=======================================
  Coverage   98.19%   98.20%           
=======================================
  Files          64       64           
  Lines        7922     7926    +4     
=======================================
+ Hits         7779     7783    +4     
  Misses        143      143           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link

sonarcloud bot commented Aug 2, 2024

Copy link
Contributor

@johannaengland johannaengland left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added a few more instances where it's nice to use the enums

@stveit stveit merged commit 8a0227d into master Aug 2, 2024
10 of 11 checks passed
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.

2 participants