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

refactor(anta): Change TestStatus to be an Enum for coding clarity #758

Merged
merged 10 commits into from
Aug 30, 2024

Conversation

gmuloc
Copy link
Collaborator

@gmuloc gmuloc commented Jul 18, 2024

Description

In #740 we end up doing getargs(TestStatus) on a Literal type which feels very awkward. This PR defines a proper type for TestStatus based on built-in Python Enum (can be made better in Python 3.11 with StrEnum)

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my code
  • I have run pre-commit for code linting and typing (pre-commit run)
  • I have made corresponding changes to the documentation
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes (tox -e testenv)

@gmuloc gmuloc changed the title Refactor: Change TestStatus to be an Enum for coding clarity refactor(anta): Change TestStatus to be an Enum for coding clarity Jul 18, 2024
Copy link

sonarcloud bot commented Jul 25, 2024

@gmuloc gmuloc requested review from titom73 and mtache and removed request for titom73 August 1, 2024 08:06
Copy link
Contributor

This pull request has conflicts, please resolve those before we can evaluate the pull request.

Copy link
Contributor

Conflicts have been resolved. A maintainer will review the pull request shortly.

anta/result_manager/models.py Outdated Show resolved Hide resolved
Copy link
Collaborator Author

@gmuloc gmuloc left a comment

Choose a reason for hiding this comment

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

LGTM but can't approve

Copy link
Contributor

@carl-baillargeon carl-baillargeon left a comment

Choose a reason for hiding this comment

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

LGTM.

Copy link

sonarcloud bot commented Aug 30, 2024

@carl-baillargeon carl-baillargeon merged commit 7ff8043 into aristanetworks:main Aug 30, 2024
19 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants