Skip to content
This repository has been archived by the owner on Nov 17, 2023. It is now read-only.

Tighten up PyLint directives again #12322

Merged
merged 3 commits into from
Aug 24, 2018

Conversation

cclauss
Copy link
Contributor

@cclauss cclauss commented Aug 23, 2018

Description

#12278 became disconnected from my fork so its branch is now unknown repository. This prevents me from resolving the conflict or making other requested changes. This PR attempts to be and exact copy of #12278 @ vandanavk and @marcoabreu, please rereview this PR.

Remove PyLint disable directives that the codebase is not violating. This tightens up the linting of future proposed changes. Also looked through PyLint issues that were only being flagged once in the code base to see if small changes code make the code compliant. Fixed via code changes:

************* Module setup
python/setup.py:32:0: C0413: Import "from setuptools import find_packages" should be placed at the top of the module (wrong-import-position)
************* Module mxnet.executor_manager
python/mxnet/executor_manager.py:130:24: C0121: Comparison to False should be 'expr' or 'expr is not False' (singleton-comparison)
************* Module mxnet.model
python/mxnet/model.py:136:16: W1508: os.getenv default type is builtins.int. Expected str or None. (invalid-envvar-default)
python/mxnet/model.py:192:0: R1711: Useless return at end of function or method (useless-return)
************* Module mxnet.gluon.rnn.rnn_cell
python/mxnet/gluon/rnn/rnn_cell.py:253:4: R0911: Too many return statements (7/6) (too-many-return-statements)
************* Module mxnet.image.detection
python/mxnet/image/detection.py:311:16: R0916: Too many boolean expressions in if statement (6/5) (too-many-boolean-expressions)

@vandanavk

Checklist

Essentials

Please feel free to remove inapplicable items for your PR.

  • The PR title starts with [MXNET-$JIRA_ID], where $JIRA_ID refers to the relevant JIRA issue created (except PRs with tiny changes)
  • Changes are complete (i.e. I finished coding on this PR)
  • All changes have test coverage:
  • Unit tests are added for small changes to verify correctness (e.g. adding a new operator)
  • Nightly tests are added for complicated/long-running ones (e.g. changing distributed kvstore)
  • Build tests will be added for build configuration changes (e.g. adding a new build option with NCCL)
  • Code is well-documented:
  • For user-facing API changes, API doc string has been updated.
  • For new C++ functions in header files, their functionalities and arguments are documented.
  • For new examples, README.md is added to explain the what the example does, the source of the dataset, expected performance on test set and reference to the original paper if applicable
  • Check the API doc at http://mxnet-ci-doc.s3-accelerate.dualstack.amazonaws.com/PR-$PR_ID/$BUILD_ID/index.html
  • To the my best knowledge, examples are either not affected by this change, or have been fixed to be compatible with this change

Changes

  • Feature1, tests, (and when applicable, API doc)
  • Feature2, tests, (and when applicable, API doc)

Comments

  • If this change is a backward incompatible change, why must this change be made.
  • Interesting edge cases to note here

@cclauss cclauss requested a review from szha as a code owner August 23, 2018 22:42
@cclauss cclauss mentioned this pull request Aug 24, 2018
7 tasks
@marcoabreu marcoabreu merged commit 2276bb0 into apache:master Aug 24, 2018
@cclauss cclauss deleted the Tighten-up-PyLint-directives branch August 24, 2018 17:13
XinYao1994 pushed a commit to XinYao1994/incubator-mxnet that referenced this pull request Aug 29, 2018
* Tighten up PyLint directives again

* Disable too-many-locals

* Doubly disable too-many-locals
anirudh2290 pushed a commit to anirudh2290/mxnet that referenced this pull request Sep 19, 2018
* Tighten up PyLint directives again

* Disable too-many-locals

* Doubly disable too-many-locals
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants