-
Notifications
You must be signed in to change notification settings - Fork 292
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 from_dict() wrappers to spl/token/instructions.py #478
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #478 +/- ##
==========================================
+ Coverage 92.00% 92.18% +0.17%
==========================================
Files 27 27
Lines 2226 2277 +51
==========================================
+ Hits 2048 2099 +51
Misses 178 178 |
src/spl/token/instructions.py
Outdated
@classmethod | ||
def from_dict(cls, params: dict) -> "AuthorityType": | ||
"""AuthorityType dict wrapper.""" | ||
return cls(**params) | ||
|
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.
@classmethod | |
def from_dict(cls, params: dict) -> "AuthorityType": | |
"""AuthorityType dict wrapper.""" | |
return cls(**params) |
This one is not necessary as it is an Enum
Would you mind updating the corresponding unit tests here?
|
66d2e94
to
138ca9b
Compare
What does this achieve? Can't the user already call |
you are right. I falsely assumed that you were asking for something like python coding style convention. But regarding #344 , can you explain what more pythonic is? |
related #344