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

Add pylint rc file #283

Merged
merged 3 commits into from
Nov 18, 2020
Merged

Add pylint rc file #283

merged 3 commits into from
Nov 18, 2020

Conversation

innerlee
Copy link
Contributor

@innerlee innerlee commented Nov 17, 2020

Usage

pylint mmpose

Currently this is added for convenience.
On current master:

************* Module mmpose.core.post_processing.group
mmpose/core/post_processing/group.py:317:12: W0632: Possible unbalanced tuple unpacking with sequence defined at line 2 of : left side has 2 label(s), right side has 1 value(s) (unbalanced-tuple-unpacking)
mmpose/core/post_processing/group.py:378:12: C0200: Consider using enumerate instead of iterating with range and len (consider-using-enumerate)
************* Module mmpose.core.evaluation.eval_hooks
mmpose/core/evaluation/eval_hooks.py:99:8: C0415: Import outside toplevel (mmpose.apis.single_gpu_test) (import-outside-toplevel)
mmpose/core/evaluation/eval_hooks.py:169:8: C0415: Import outside toplevel (mmpose.apis.multi_gpu_test) (import-outside-toplevel)
************* Module mmpose.core.fp16.utils
mmpose/core/fp16/utils.py:18:4: R1705: Unnecessary "elif" after "return" (no-else-return)
************* Module mmpose.datasets.datasets.top_down.topdown_posetrack18_dataset
mmpose/datasets/datasets/top_down/topdown_posetrack18_dataset.py:140:12: R1704: Redefining argument with the local name 'metric' (redefined-argument-from-local)
************* Module mmpose.datasets.datasets.top_down.topdown_mpii_trb_dataset
mmpose/datasets/datasets/top_down/topdown_mpii_trb_dataset.py:170:12: R1704: Redefining argument with the local name 'metric' (redefined-argument-from-local)
mmpose/datasets/datasets/top_down/topdown_mpii_trb_dataset.py:173:8: W0105: String statement has no effect (pointless-string-statement)
************* Module mmpose.datasets.datasets.top_down.topdown_coco_dataset
mmpose/datasets/datasets/top_down/topdown_coco_dataset.py:321:12: R1704: Redefining argument with the local name 'metric' (redefined-argument-from-local)
************* Module mmpose.datasets.datasets.top_down.topdown_mpii_dataset
mmpose/datasets/datasets/top_down/topdown_mpii_dataset.py:168:12: R1704: Redefining argument with the local name 'metric' (redefined-argument-from-local)
************* Module mmpose.datasets.datasets.bottom_up.bottom_up_coco
mmpose/datasets/datasets/bottom_up/bottom_up_coco.py:233:12: R1704: Redefining argument with the local name 'metric' (redefined-argument-from-local)
mmpose/datasets/datasets/bottom_up/bottom_up_coco.py:205:0: W0613: Unused argument 'kwargs' (unused-argument)
************* Module mmpose.datasets.datasets.hand.panoptic_dataset
mmpose/datasets/datasets/hand/panoptic_dataset.py:150:12: R1704: Redefining argument with the local name 'metric' (redefined-argument-from-local)
************* Module mmpose.datasets.datasets.hand.onehand10k_dataset
mmpose/datasets/datasets/hand/onehand10k_dataset.py:146:12: R1704: Redefining argument with the local name 'metric' (redefined-argument-from-local)
************* Module mmpose.datasets.datasets.hand.freihand_dataset
mmpose/datasets/datasets/hand/freihand_dataset.py:146:12: R1704: Redefining argument with the local name 'metric' (redefined-argument-from-local)
************* Module mmpose.datasets.datasets.hand.interhand2d_dataset
mmpose/datasets/datasets/hand/interhand2d_dataset.py:247:12: R1704: Redefining argument with the local name 'metric' (redefined-argument-from-local)
************* Module mmpose.datasets.datasets.mesh.mesh_base_dataset
mmpose/datasets/datasets/mesh/mesh_base_dataset.py:129:8: C0200: Consider using enumerate instead of iterating with range and len (consider-using-enumerate)
************* Module mmpose.datasets.datasets.mesh.mesh_h36m_dataset
mmpose/datasets/datasets/mesh/mesh_h36m_dataset.py:34:12: R1704: Redefining argument with the local name 'metric' (redefined-argument-from-local)
mmpose/datasets/datasets/mesh/mesh_h36m_dataset.py:30:66: W0613: Unused argument 'logger' (unused-argument)
************* Module mmpose.datasets.pipelines.mesh_transform
mmpose/datasets/pipelines/mesh_transform.py:169:0: R0205: Class 'LoadIUVFromFile' inherits from object, can be safely removed from bases in python3 (useless-object-inheritance)
************* Module mmpose.datasets.pipelines.top_down_transform
mmpose/datasets/pipelines/top_down_transform.py:315:4: R0201: Method could be a function (no-self-use)
************* Module mmpose.datasets.pipelines.bottom_up_transform
mmpose/datasets/pipelines/bottom_up_transform.py:164:8: C0200: Consider using enumerate instead of iterating with range and len (consider-using-enumerate)
************* Module mmpose.utils.hooks
mmpose/utils/hooks.py:16:21: W0613: Unused argument 'model' (unused-argument)
mmpose/utils/hooks.py:16:28: W0613: Unused argument 'input' (unused-argument)
************* Module mmpose.models.losses.multi_loss_factory
mmpose/models/losses/multi_loss_factory.py:90:8: R1705: Unnecessary "elif" after "return" (no-else-return)
mmpose/models/losses/multi_loss_factory.py:227:8: C0200: Consider using enumerate instead of iterating with range and len (consider-using-enumerate)
************* Module mmpose.models.keypoint_heads.top_down_multi_stage_head
mmpose/models/keypoint_heads/top_down_multi_stage_head.py:81:12: W0612: Unused variable 'i' (unused-variable)
mmpose/models/keypoint_heads/top_down_multi_stage_head.py:330:12: W0612: Unused variable 'i' (unused-variable)
mmpose/models/keypoint_heads/top_down_multi_stage_head.py:331:16: W0612: Unused variable 'j' (unused-variable)
************* Module mmpose.models.detectors.bottom_up
mmpose/models/detectors/bottom_up.py:330:24: R0916: Too many boolean expressions in if statement (10/5) (too-many-boolean-expressions)
mmpose/models/detectors/bottom_up.py:265:20: W0613: Unused argument 'thickness' (unused-argument)
mmpose/models/detectors/bottom_up.py:266:20: W0613: Unused argument 'font_scale' (unused-argument)
************* Module mmpose.models.detectors.base
mmpose/models/detectors/base.py:83:37: W0613: Unused argument 'optimizer' (unused-argument)
mmpose/models/detectors/base.py:83:0: W0613: Unused argument 'kwargs' (unused-argument)
mmpose/models/detectors/base.py:120:35: W0613: Unused argument 'optimizer' (unused-argument)
mmpose/models/detectors/base.py:120:0: W0613: Unused argument 'kwargs' (unused-argument)
************* Module mmpose.models.detectors.top_down
mmpose/models/detectors/top_down.py:129:12: C0200: Consider using enumerate instead of iterating with range and len (consider-using-enumerate)
mmpose/models/detectors/top_down.py:348:28: R0916: Too many boolean expressions in if statement (10/5) (too-many-boolean-expressions)
mmpose/models/detectors/top_down.py:262:20: W0613: Unused argument 'text_color' (unused-argument)
mmpose/models/detectors/top_down.py:264:20: W0613: Unused argument 'font_scale' (unused-argument)
************* Module mmpose.models.backbones.regnet
mmpose/models/backbones/regnet.py:279:4: R0201: Method could be a function (no-self-use)
************* Module mmpose.models.backbones.resnet
mmpose/models/backbones/resnet.py:398:16: W0612: Unused variable 'i' (unused-variable)
mmpose/models/backbones/resnet.py:563:4: R0201: Method could be a function (no-self-use)

------------------------------------------------------------------
Your code has been rated at 9.94/10 (previous run: 9.94/10, +0.00)

Signed-off-by: lizz <lizz@sensetime.com>
@codecov
Copy link

codecov bot commented Nov 17, 2020

Codecov Report

Merging #283 (88a352d) into master (fd8442f) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #283   +/-   ##
=======================================
  Coverage   83.85%   83.85%           
=======================================
  Files         114      114           
  Lines        7072     7072           
  Branches     1118     1118           
=======================================
  Hits         5930     5930           
  Misses        941      941           
  Partials      201      201           
Flag Coverage Δ
unittests 83.85% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.


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 fd8442f...32cef89. Read the comment docs.

Signed-off-by: lizz <lizz@sensetime.com>
Signed-off-by: lizz <lizz@sensetime.com>
@innerlee innerlee merged commit 586cea7 into master Nov 18, 2020
@jin-s13 jin-s13 deleted the zz/lint branch November 19, 2020 04:42
shuheilocale pushed a commit to shuheilocale/mmpose that referenced this pull request May 6, 2023
* Add pylint rc file

Signed-off-by: lizz <lizz@sensetime.com>

* no cyclic-import bad-super-call

Signed-off-by: lizz <lizz@sensetime.com>

* no too-many-statements

Signed-off-by: lizz <lizz@sensetime.com>
HAOCHENYE pushed a commit to HAOCHENYE/mmpose that referenced this pull request Jun 27, 2023
ajgrafton pushed a commit to ajgrafton/mmpose that referenced this pull request Mar 6, 2024
* Add pylint rc file

Signed-off-by: lizz <lizz@sensetime.com>

* no cyclic-import bad-super-call

Signed-off-by: lizz <lizz@sensetime.com>

* no too-many-statements

Signed-off-by: lizz <lizz@sensetime.com>
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

Successfully merging this pull request may close these issues.

2 participants