-
Notifications
You must be signed in to change notification settings - Fork 115
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
Update Pylint to 2.5.3 #224
Merged
Merged
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
haroldrandom
reviewed
Jul 7, 2020
useless-suppression | ||
useless-suppression, | ||
import-outside-toplevel, | ||
wrong-import-order |
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.
which part of code cause wrong-import-order?
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.
Right in the PR description. ⬆
For import-outside-toplevel
:
py38 run-test: commands[2] | pylint azdev --rcfile=.pylintrc -r n
************* Module azdev.__main__
azdev\__main__.py:19:8: C0415: Import outside toplevel (.__VERSION__) (import-outside-toplevel)
azdev\__main__.py:25:8: C0415: Import outside toplevel (azdev.commands.load_command_table) (import-outside-toplevel)
azdev\__main__.py:31:8: C0415: Import outside toplevel (azdev.params.load_arguments) (import-outside-toplevel)
************* Module azdev.operations.code_gen
azdev\operations\code_gen.py:92:4: C0415: Import outside toplevel (tempfile) (import-outside-toplevel)
azdev\operations\code_gen.py:93:4: C0415: Import outside toplevel (zipfile) (import-outside-toplevel)
azdev\operations\code_gen.py:126:4: C0415: Import outside toplevel (shutil) (import-outside-toplevel)
azdev\operations\code_gen.py:183:4: C0415: Import outside toplevel (jinja2.Environment, jinja2.PackageLoader) (import-outside-toplevel)
************* Module azdev.operations.performance
azdev\operations\performance.py:172:4: C0415: Import outside toplevel (multiprocessing) (import-outside-toplevel)
azdev\operations\performance.py:209:4: C0415: Import outside toplevel (signal) (import-outside-toplevel)
azdev\operations\performance.py:221:4: C0415: Import outside toplevel (math.sqrt) (import-outside-toplevel)
************* Module azdev.operations.pypi
azdev\operations\pypi.py:131:4: C0415: Import outside toplevel (tempfile) (import-outside-toplevel)
azdev\operations\pypi.py:132:4: C0415: Import outside toplevel (shutil) (import-outside-toplevel)
azdev\operations\pypi.py:199:4: C0415: Import outside toplevel (zipfile) (import-outside-toplevel)
azdev\operations\pypi.py:280:4: C0415: Import outside toplevel (difflib) (import-outside-toplevel)
azdev\operations\pypi.py:297:4: C0415: Import outside toplevel (filecmp) (import-outside-toplevel)
************* Module azdev.operations.resource
azdev\operations\resource.py:28:4: C0415: Import outside toplevel (datetime.datetime, datetime.timedelta) (import-outside-toplevel)
************* Module azdev.operations.setup
azdev\operations\setup.py:133:8: C0415: Import outside toplevel (platform) (import-outside-toplevel)
azdev\operations\setup.py:146:4: C0415: Import outside toplevel (glob.glob) (import-outside-toplevel)
azdev\operations\setup.py:147:4: C0415: Import outside toplevel (importlib.import_module) (import-outside-toplevel)
azdev\operations\setup.py:163:4: C0415: Import outside toplevel (knack.prompting.prompt_y_n, knack.prompting.prompt) (import-outside-toplevel)
************* Module azdev.operations.extensions.util
azdev\operations\extensions\util.py:72:4: C0415: Import outside toplevel (requests) (import-outside-toplevel)
************* Module azdev.operations.extensions
azdev\operations\extensions\__init__.py:84:4: C0415: Import outside toplevel (glob.glob) (import-outside-toplevel)
azdev\operations\extensions\__init__.py:105:4: C0415: Import outside toplevel (glob.glob) (import-outside-toplevel)
azdev\operations\extensions\__init__.py:138:4: C0415: Import outside toplevel (hashlib) (import-outside-toplevel)
azdev\operations\extensions\__init__.py:147:4: C0415: Import outside toplevel (azdev.operations.setup._check_repo) (import-outside-toplevel)
azdev\operations\extensions\__init__.py:187:4: C0415: Import outside toplevel (re) (import-outside-toplevel)
azdev\operations\extensions\__init__.py:188:4: C0415: Import outside toplevel (tempfile) (import-outside-toplevel)
azdev\operations\extensions\__init__.py:190:4: C0415: Import outside toplevel (util.get_ext_metadata, util.get_whl_from_url) (import-outside-toplevel)
azdev\operations\extensions\__init__.py:275:4: C0415: Import outside toplevel (azure.storage.blob.BlockBlobService) (import-outside-toplevel)
************* Module azdev.operations.help
azdev\operations\help\__init__.py:304:4: C0415: Import outside toplevel (requests) (import-outside-toplevel)
************* Module azdev.operations.linter.linter
azdev\operations\linter\linter.py:157:8: C0415: Import outside toplevel (knack.deprecation.Deprecated) (import-outside-toplevel)
azdev\operations\linter\linter.py:278:8: C0415: Import outside toplevel (colorama.Fore) (import-outside-toplevel)
************* Module azdev.operations.linter.util
azdev\operations\linter\util.py:89:4: C0415: Import outside toplevel (azure.cli.core.commands.ExtensionCommandSource) (import-outside-toplevel)
************* Module azdev.operations.linter
azdev\operations\linter\__init__.py:34:4: C0415: Import outside toplevel (azure.cli.core.get_default_cli) (import-outside-toplevel)
azdev\operations\linter\__init__.py:35:4: C0415: Import outside toplevel (azure.cli.core.file_util.get_all_help, azure.cli.core.file_util.create_invoker_and_load_cmds_and_args) (import-outside-toplevel)
************* Module azdev.operations.tests
azdev\operations\tests\__init__.py:122:4: C0415: Import outside toplevel (azdev.utilities.diff_branches, azdev.utilities.extract_module_name) (import-outside-toplevel)
azdev\operations\tests\__init__.py:123:4: C0415: Import outside toplevel (azdev.utilities.git_util.summarize_changed_mods) (import-outside-toplevel)
azdev\operations\tests\__init__.py:266:8: C0415: Import outside toplevel (azdev.utilities.extract_module_name) (import-outside-toplevel)
************* Module azdev.utilities.command
azdev\utilities\command.py:24:4: C0415: Import outside toplevel (azdev.utilities.IS_WINDOWS) (import-outside-toplevel)
azdev\utilities\command.py:40:4: C0415: Import outside toplevel (azdev.utilities.IS_WINDOWS, azdev.utilities.display) (import-outside-toplevel)
azdev\utilities\command.py:70:4: C0415: Import outside toplevel (azdev.utilities.get_env_path) (import-outside-toplevel)
************* Module azdev.utilities.config
azdev\utilities\config.py:22:4: C0415: Import outside toplevel (azdev.utilities.get_env_path) (import-outside-toplevel)
************* Module azdev.utilities.git_util
azdev\utilities\git_util.py:47:4: C0415: Import outside toplevel (azdev.utilities.extract_module_name) (import-outside-toplevel)
azdev\utilities\git_util.py:64:8: C0415: Import outside toplevel (git) (import-outside-toplevel)
azdev\utilities\git_util.py:65:8: C0415: Import outside toplevel (git.exc) (import-outside-toplevel)
azdev\utilities\git_util.py:66:8: C0415: Import outside toplevel (gitdb) (import-outside-toplevel)
azdev\utilities\git_util.py:70:4: C0415: Import outside toplevel (git.Repo) (import-outside-toplevel)
************* Module azdev.utilities.path
azdev\utilities\path.py:17:4: C0415: Import outside toplevel (re) (import-outside-toplevel)
azdev\utilities\path.py:60:4: C0415: Import outside toplevel (configparser.NoSectionError) (import-outside-toplevel)
azdev\utilities\path.py:61:4: C0415: Import outside toplevel (config.get_azdev_config) (import-outside-toplevel)
azdev\utilities\path.py:73:4: C0415: Import outside toplevel (configparser.NoSectionError) (import-outside-toplevel)
azdev\utilities\path.py:74:4: C0415: Import outside toplevel (config.get_azdev_config) (import-outside-toplevel)
azdev\utilities\path.py:109:4: C0415: Import outside toplevel (errno) (import-outside-toplevel)
azdev\utilities\path.py:122:4: C0415: Import outside toplevel (azure.cli.core.extension.EXTENSIONS_DIR) (import-outside-toplevel)
azdev\utilities\path.py:193:4: C0415: Import outside toplevel (azure.cli.core.extension.EXTENSIONS_DIR) (import-outside-toplevel)
************* Module azdev.utilities.testing
azdev\utilities\testing.py:9:4: C0415: Import outside toplevel (azdev.__main__.main) (import-outside-toplevel)
azdev\utilities\testing.py:10:4: C0415: Import outside toplevel (sys) (import-outside-toplevel)
************* Module azdev.utilities.tools
azdev\utilities\tools.py:11:4: C0415: Import outside toplevel (azdev.utilities.get_env_path) (import-outside-toplevel)
azdev\utilities\tools.py:20:8: C0415: Import outside toplevel (azure.cli.core) (import-outside-toplevel)
-----------------------------------
Your code has been rated at 9.81/10
haroldrandom
approved these changes
Jul 7, 2020
haroldrandom
approved these changes
Jul 7, 2020
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.
Same as microsoft/knack#216
CI was broken due to a breaking change in
isort
PyCQA/isort#1273:Pylint has pinned the version of
isort
in pylint-dev/pylint#2773, so updating Pylint so thatisort
is pinned (pylint-dev/pylint#2773).wrong-import-order
is disabled due to pylint-dev/pylint#2175, pylint-dev/pylint#1797Otherwise will get error:
This is because
knack
is installed bypip install --editable
from source code, and is treated as a first-party lib by pylint. However, no idea whyazure.cli.core
is treated as a third-party library even though it is also installed from source code.