-
Notifications
You must be signed in to change notification settings - Fork 1
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
Add title to endpoint definition #108
Conversation
Coverage reportClick to see where and how coverage changed
This report was generated by python-coverage-comment-action |
multiversx_sdk/abi/abi_definition.py
Outdated
@@ -86,14 +86,16 @@ def __init__(self, | |||
inputs: List["ParameterDefinition"], | |||
outputs: List["ParameterDefinition"], | |||
payable_in_tokens: List[str], | |||
only_owner: bool) -> None: | |||
only_owner: bool, | |||
title: 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.
Tiny breaking chance, but should not be noticed by developers.
The alternative would have been to use Optional[str]
.
But it's all right this way, as well.
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.
I updated to use the Optional[str] 👍
6e8bd59
@@ -7,7 +7,7 @@ allow-direct-references = true | |||
|
|||
[project] | |||
name = "multiversx-sdk" | |||
version = "0.13.2" | |||
version = "0.14.0" |
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.
If title is optional (no breaking change), can increment the last segment (since it's < v1).
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.
I will leave it like this as it is not a bug fix
multiversx_sdk/abi/abi_definition.py
Outdated
@@ -87,7 +87,7 @@ def __init__(self, | |||
outputs: List["ParameterDefinition"], | |||
payable_in_tokens: List[str], | |||
only_owner: bool, | |||
title: str) -> None: | |||
title: Optional[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.
If optional, can be set to None by default. If None by default, then, in constructor, do self.title = title or ""
.
Otherwise, here it can also be title: str = ""
(and no other change in constructor).
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.
Done
No description provided.