-
Notifications
You must be signed in to change notification settings - Fork 31
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
Made behaviour of keep_at_least parameter predictable #68
Conversation
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## main #68 +/- ##
==========================================
- Coverage 93.27% 89.74% -3.53%
==========================================
Files 1 1
Lines 223 234 +11
Branches 54 57 +3
==========================================
+ Hits 208 210 +2
- Misses 7 15 +8
- Partials 8 9 +1
☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is looking promising. Would you mind adding a PR description and pinging me when it's 100%?
main.py
Outdated
def validate_org_name(cls, v: str, values: dict) -> str | None: | ||
if values['account_type'] == AccountType.ORG and not v: | ||
@field_validator('org_name', mode='before') | ||
def validate_org_name(cls, v: str, values: Any) -> str | None: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there not a more specific type signature we can use here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is ValidationInfo
correct?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah
# If we got here, most probably we will delete image. | ||
# For pseudo-branching we set delete_image to true and | ||
# handle cases with delete image by tag filtering in separate pseudo-branch |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you explain this a bit more? What are pseudo-branches?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In my understanding, this code looks a lot like if .. else.
So i've decided to make comment that helps understand the logic here.
Done. |
Cheers @yma-het, I'll take a look at this this weekend 👍 |
Any news here? |
Changes look good. Thanks a lot @yma-het 🙇 The new release should be out now. Let me know if you run into any issues |
When i'm reading the name of param "keep-at-least", i expect that all of images will be accounted in this number, not only marked for deletion. This PR makes behavior of keep-at-least parameter more predictable.