-
Notifications
You must be signed in to change notification settings - Fork 27
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
#167: Add Client class under Service class #222
Conversation
src/Nirum/Targets/Python.hs
Outdated
if hasattr({className}.Client, '__qualname__'): | ||
{className}.Client.__qualname__ = '{className}.Client' | ||
else: | ||
{className}.Client.__name__ = '{className}.Client' |
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.
이건 안 해주셔도 될 것 같습니다. 어차피 파이썬 2에서 inner class에 대해서 이런 걸 해주지 않아서…
그냥 파이썬 2에서도 __qualname__
세팅해주면 될 것 같습니다. 파이썬 2에서는 있어도 무시하기 때문에 어떻게 하든 같은 거라서요.
test/python/service_test.py
Outdated
|
||
def test_service_client_representation(): | ||
assert repr(SampleService.Client) == \ | ||
"<class 'fixture.foo.SampleService.Client'>" |
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.
이거 진짜 그냥 __qualname__
만 검사해도 될 것 같아요.
@dahlia 반0하였습니다 |
src/Nirum/Targets/Python.hs
Outdated
if hasattr({className}.Client, '__qualname__'): | ||
{className}.Client.__qualname__ = '{className}.Client' | ||
else: | ||
{className}.Client.__name__ = 'Client' |
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.
파이썬 3에서도 __name__
은 'Client'
여야 하지 않을까요?
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.
반영하였습니다.
Fixes #167