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

chore(flow): no constructor for class method needed #1352

Merged
merged 1 commit into from Nov 25, 2020
Merged

chore(flow): no constructor for class method needed #1352

merged 1 commit into from Nov 25, 2020

Conversation

florian-hoenicke
Copy link
Member

Since load_config is a classmethod, we don't need to call it on a Flow object. Instead we can call the classmethod directly.

@florian-hoenicke florian-hoenicke requested a review from a team as a code owner November 25, 2020 15:36
@jina-bot jina-bot added size/S area/docs This issue/PR affects the docs area/testing This issue/PR affects testing labels Nov 25, 2020
@codecov
Copy link

codecov bot commented Nov 25, 2020

Codecov Report

Merging #1352 (c92fcda) into master (ac38ebf) will increase coverage by 0.05%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1352      +/-   ##
==========================================
+ Coverage   82.87%   82.93%   +0.05%     
==========================================
  Files         103      103              
  Lines        6746     6746              
==========================================
+ Hits         5591     5595       +4     
+ Misses       1155     1151       -4     
Impacted Files Coverage Δ
jina/docker/hubio.py 64.85% <0.00%> (-0.86%) ⬇️
jina/peapods/pea.py 92.44% <0.00%> (+0.71%) ⬆️
jina/peapods/grpc_asyncio.py 80.61% <0.00%> (+5.10%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update ac38ebf...c92fcda. Read the comment docs.

Copy link
Member

@bwanglzu bwanglzu left a comment

Choose a reason for hiding this comment

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

Good catch!

@cristianmtr
Copy link
Contributor

Nice, but then should't it be a staticmethod? I can't see that the cls is being used.

@JoanFM JoanFM merged commit 60d60f5 into jina-ai:master Nov 25, 2020
@JoanFM
Copy link
Member

JoanFM commented Nov 25, 2020

Nice, but then should't it be a staticmethod? I can't see that the cls is being used.

yes, u are right, it should be a static

@nan-wang
Copy link
Member

@florian-hoenicke Good job! A minor comment. chore(xxx): will skip our unit tests. For the changes like this PR, it's better to use refactor(xxx):

@hanxiao
Copy link
Member

hanxiao commented Nov 26, 2020

@florian-hoenicke Good job! A minor comment. chore(xxx): will skip our unit tests. For the changes like this PR, it's better to use refactor(xxx):

correct: skip our cd not skip unit test

@florian-hoenicke
Copy link
Member Author

@nan-wang Thanks, I will use refactor in the future.

@florian-hoenicke florian-hoenicke deleted the chore-flow-classmethod-no-const branch November 26, 2020 10:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/docs This issue/PR affects the docs area/testing This issue/PR affects testing size/S
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants