-
Notifications
You must be signed in to change notification settings - Fork 50
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
change to pylint #134
Merged
Merged
change to pylint #134
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Signed-off-by: Keming <kemingy94@gmail.com>
Signed-off-by: Keming <kemingy94@gmail.com>
Signed-off-by: Keming <kemingy94@gmail.com>
There are still some lint warnings that may need to discuss: ❯ pylint -j 4 mosec/ --reports=yes (base)
************* Module mosec.worker
mosec/worker.py:61:4: R0201: Method could be a function (no-self-use)
mosec/worker.py:65:4: R0201: Method could be a function (no-self-use)
mosec/worker.py:76:4: C0103: Attribute name "id" doesn't conform to snake_case naming style (invalid-name)
mosec/worker.py:84:4: R0201: Method could be a function (no-self-use)
mosec/worker.py:102:4: R0201: Method could be a function (no-self-use)
************* Module mosec.coordinator
mosec/coordinator.py:49:4: R0913: Too many arguments (10/5) (too-many-arguments)
mosec/coordinator.py:137:23: W0703: Catching too general exception Exception (broad-except)
mosec/coordinator.py:163:28: W0212: Access to a protected member _stage of a client class (protected-access)
mosec/coordinator.py:165:15: W0212: Access to a protected member _deserialize_ipc of a client class (protected-access)
mosec/coordinator.py:172:27: W0212: Access to a protected member _stage of a client class (protected-access)
mosec/coordinator.py:174:15: W0212: Access to a protected member _serialize_ipc of a client class (protected-access)
mosec/coordinator.py:183:28: W0212: Access to a protected member _stage of a client class (protected-access)
mosec/coordinator.py:198:27: W0212: Access to a protected member _stage of a client class (protected-access)
mosec/coordinator.py:250:19: W0703: Catching too general exception Exception (broad-except)
mosec/coordinator.py:228:23: W0212: Access to a protected member _max_batch_size of a client class (protected-access)
************* Module mosec.server
mosec/server.py:44:0: R0902: Too many instance attributes (13/7) (too-many-instance-attributes)
mosec/server.py:176:39: R1732: Consider using 'with' for resource-allocating operations (consider-using-with)
mosec/server.py:298:4: R0913: Too many arguments (6/5) (too-many-arguments)
mosec/server.py:333:15: W0703: Catching too general exception Exception (broad-except)
mosec/server.py:339:60: C0103: Argument name "id" doesn't conform to snake_case naming style (invalid-name)
mosec/server.py:339:60: W0622: Redefining built-in 'id' (redefined-builtin)
Report
======
469 statements analysed.
Statistics by type
------------------
+---------+-------+-----------+-----------+------------+---------+
|type |number |old number |difference |%documented |%badname |
+=========+=======+===========+===========+============+=========+
|module |11 |11 |= |18.18 |0.00 |
+---------+-------+-----------+-----------+------------+---------+
|class |8 |8 |= |100.00 |0.00 |
+---------+-------+-----------+-----------+------------+---------+
|method |43 |43 |= |100.00 |0.00 |
+---------+-------+-----------+-----------+------------+---------+
|function |8 |8 |= |100.00 |0.00 |
+---------+-------+-----------+-----------+------------+---------+
External dependencies
---------------------
::
mosec
\-args (mosec.server)
\-coordinator (mosec.server)
\-errors (mosec.coordinator,mosec.worker)
\-ipc (mosec.coordinator,mosec.plugins.plasma_shm,mosec.server)
\-protocol (mosec.coordinator)
\-worker (mosec.coordinator,mosec.server)
pkg_resources (mosec.server)
pyarrow
\-plasma (mosec.plugins.plasma_shm)
Raw metrics
-----------
+----------+-------+------+---------+-----------+
|type |number |% |previous |difference |
+==========+=======+======+=========+===========+
|code |634 |52.88 |NC |NC |
+----------+-------+------+---------+-----------+
|docstring |254 |21.18 |NC |NC |
+----------+-------+------+---------+-----------+
|comment |159 |13.26 |NC |NC |
+----------+-------+------+---------+-----------+
|empty |152 |12.68 |NC |NC |
+----------+-------+------+---------+-----------+
Duplication
-----------
+-------------------------+------+---------+-----------+
| |now |previous |difference |
+=========================+======+=========+===========+
|nb duplicated lines |0 |0 |0 |
+-------------------------+------+---------+-----------+
|percent duplicated lines |0.000 |0.000 |= |
+-------------------------+------+---------+-----------+
Messages by category
--------------------
+-----------+-------+---------+-----------+
|type |number |previous |difference |
+===========+=======+=========+===========+
|convention |2 |2 |2 |
+-----------+-------+---------+-----------+
|refactor |8 |8 |8 |
+-----------+-------+---------+-----------+
|warning |11 |11 |11 |
+-----------+-------+---------+-----------+
|error |0 |0 |0 |
+-----------+-------+---------+-----------+
Messages
--------
+-----------------------------+------------+
|message id |occurrences |
+=============================+============+
|protected-access |7 |
+-----------------------------+------------+
|no-self-use |4 |
+-----------------------------+------------+
|broad-except |3 |
+-----------------------------+------------+
|too-many-arguments |2 |
+-----------------------------+------------+
|invalid-name |2 |
+-----------------------------+------------+
|too-many-instance-attributes |1 |
+-----------------------------+------------+
|redefined-builtin |1 |
+-----------------------------+------------+
|consider-using-with |1 |
+-----------------------------+------------+
------------------------------------------------------------------
Your code has been rated at 9.55/10 (previous run: 9.55/10, +0.00) |
Signed-off-by: Keming <kemingy94@gmail.com>
kemingy
commented
May 19, 2022
TODO: make sure |
lkevinzc
reviewed
May 20, 2022
lkevinzc
reviewed
May 20, 2022
lkevinzc
reviewed
May 20, 2022
lkevinzc
reviewed
May 20, 2022
lkevinzc
reviewed
May 20, 2022
Signed-off-by: Keming <kemingy94@gmail.com>
Signed-off-by: Keming <kemingy94@gmail.com>
Signed-off-by: Keming <kemingy94@gmail.com>
lkevinzc
approved these changes
May 21, 2022
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.
LGTM. Awesome work!
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Signed-off-by: Keming kemingy94@gmail.com