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

self or cls #12

Closed
nan-wang opened this issue Feb 18, 2020 · 1 comment
Closed

self or cls #12

nan-wang opened this issue Feb 18, 2020 · 1 comment

Comments

@nan-wang
Copy link
Member

PEP-8 suggests to use self instead of cls at jina/executors/init.py#L25.

Always use self for the first argument to instance methods.

Always use cls for the first argument to class methods.

reference:
PEP-8 Function and Method Arguments

@hanxiao
Copy link
Member

hanxiao commented Feb 18, 2020

metaclass is different,cls is prefered as the first argument in the metaclass function

@hanxiao hanxiao closed this as completed Feb 18, 2020
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

No branches or pull requests

2 participants