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

#167: Add Client class under Service class #222

Merged
merged 1 commit into from
Feb 10, 2018
Merged

Conversation

qria
Copy link
Contributor

@qria qria commented Feb 9, 2018

Fixes #167

kanghyojun
kanghyojun previously approved these changes Feb 9, 2018
if hasattr({className}.Client, '__qualname__'):
{className}.Client.__qualname__ = '{className}.Client'
else:
{className}.Client.__name__ = '{className}.Client'
Copy link
Member

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에서는 있어도 무시하기 때문에 어떻게 하든 같은 거라서요.


def test_service_client_representation():
assert repr(SampleService.Client) == \
"<class 'fixture.foo.SampleService.Client'>"
Copy link
Member

Choose a reason for hiding this comment

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

이거 진짜 그냥 __qualname__만 검사해도 될 것 같아요.

@qria
Copy link
Contributor Author

qria commented Feb 9, 2018

@dahlia 반0하였습니다

if hasattr({className}.Client, '__qualname__'):
{className}.Client.__qualname__ = '{className}.Client'
else:
{className}.Client.__name__ = 'Client'
Copy link
Member

Choose a reason for hiding this comment

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

파이썬 3에서도 __name__'Client'여야 하지 않을까요?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

반영하였습니다.

@dahlia dahlia assigned qria and unassigned kanghyojun Feb 10, 2018
@dahlia dahlia added typ:enhance Type: Enhancement/new feature cmp:compiler Component: Compiler backend (e.g., annotation processors, code generators) labels Feb 10, 2018
@dahlia dahlia merged commit f606f05 into nirum-lang:master Feb 10, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cmp:compiler Component: Compiler backend (e.g., annotation processors, code generators) typ:enhance Type: Enhancement/new feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants