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

feat(api): Allow omitting description and display_color from ProtocolContext.define_liquid() #15906

Merged
merged 5 commits into from
Aug 7, 2024

Conversation

SyntaxColoring
Copy link
Contributor

@SyntaxColoring SyntaxColoring commented Aug 6, 2024

Overview

Closes AUTH-633. This is pretty simple and self-contained, so I figured we might as well try to squeeze it in v8.0.

Test Plan and Hands on Testing

Play with different apiLevels for this "protocol":

requirements = {"apiLevel": "2.20"}

def run(protocol):
    protocol.define_liquid(name="Liquid name", description=None)  # display_color omitted.

Changelog

  • When define_liquid() is called without supplying any value for description or display_color, act as if None was supplied. This takes a little bit of trickery to retain the existing behavior for older apiLevels, which is to require some explicit value, even if that value is just None. The new behavior is gated behind apiLevel 2.20.
  • A little bit of Sphinx trickery to prevent the trickery above from making the method signature look really confusing in the reference documentation.

Review requests

Do we want any of these docstring changes in a different branch?

Risk assessment

Lo.

@SyntaxColoring SyntaxColoring requested a review from a team as a code owner August 6, 2024 20:42
Copy link
Member

@sfoster1 sfoster1 left a comment

Choose a reason for hiding this comment

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

Yes, that looks very good to me. Love a sentinel.

Copy link
Contributor

@ecormany ecormany left a comment

Choose a reason for hiding this comment

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

I could nitpick on the length of the versionchanged description, but everything in it is accurate. :shipit:

@SyntaxColoring SyntaxColoring merged commit 837d5ae into chore_release-8.0.0 Aug 7, 2024
41 checks passed
@SyntaxColoring SyntaxColoring deleted the omittable_liquid_details branch August 7, 2024 13:53
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.

3 participants