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

enable CronWorkflow.from_dict() to work with subclasses #1039

Merged
merged 3 commits into from
Apr 25, 2024

Conversation

crflynn
Copy link
Contributor

@crflynn crflynn commented Apr 24, 2024

Pull Request Checklist

Description of PR
Currently, when subclassing CronWorkflow, the from_dict method returns an instance of CronWorkflow rather than the subclass.

This PR changes the creation of the instance to use cls rather than CronWorkflow, so that from_dict returns an instance of the subclass.

Signed-off-by: crflynn <flynn@simplebet.io>
@flaviuvadan flaviuvadan added semver:patch A change requiring a patch version bump type:bug A general bug labels Apr 24, 2024
Copy link

codecov bot commented Apr 24, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 81.8%. Comparing base (d553546) to head (193d535).
Report is 133 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##            main   #1039     +/-   ##
=======================================
+ Coverage   81.7%   81.8%   +0.1%     
=======================================
  Files         54      56      +2     
  Lines       4208    4228     +20     
  Branches     889     892      +3     
=======================================
+ Hits        3439    3461     +22     
+ Misses       574     571      -3     
- Partials     195     196      +1     

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

Copy link
Collaborator

@elliotgunton elliotgunton left a comment

Choose a reason for hiding this comment

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

LGTM, thanks!

@elliotgunton elliotgunton enabled auto-merge (squash) April 25, 2024 09:41
@elliotgunton elliotgunton merged commit 873c5b9 into argoproj-labs:main Apr 25, 2024
20 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
semver:patch A change requiring a patch version bump type:bug A general bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants