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

Bump pylint to 2.8.0 #295

Merged
merged 2 commits into from Apr 26, 2021
Merged

Bump pylint to 2.8.0 #295

merged 2 commits into from Apr 26, 2021

Conversation

jiasli
Copy link
Member

@jiasli jiasli commented Apr 25, 2021

Replace #294
Bump pylint to 2.8.0 to support Python 3.9 (Azure/azure-cli#17368)

@jiasli jiasli requested review from kairu-ms and qwordy April 25, 2021 08:47
setup.py Outdated Show resolved Hide resolved
@@ -158,8 +158,8 @@ def test_benchmark_with_help_command(self):

def test_benchmark_in_actual_running(self):
with mock.patch(
"multiprocessing.pool.Pool.map_async", # pylint: disable=bad-continuation
Copy link
Member Author

Choose a reason for hiding this comment

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

bad-continuation has been removed: http://pylint.pycqa.org/en/latest/whatsnew/2.6.html

Comment on lines +49 to +50
with zipfile.ZipFile(ext_file, 'r') as zip_ref:
zip_ref.extractall(ext_dir)
Copy link
Member Author

@jiasli jiasli Apr 25, 2021

Choose a reason for hiding this comment

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

Fix:

Consider using 'with' for resource-allocating operations (consider-using-with)

@@ -162,6 +162,7 @@ def benchmark(commands=None, runs=20):
for raw_command in commands:
logger.info("Measuring %s...", raw_command)

# pylint: disable=consider-using-with
Copy link
Member Author

Choose a reason for hiding this comment

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

azdev/operations/performance.py is unfinished and out of maintenance.

missing-docstring,
too-many-arguments,
raise-missing-from,
Copy link
Member Author

Choose a reason for hiding this comment

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

raise-missing-from should not be forced:

W0707: Consider explicitly re-raising using the 'from' keyword (raise-missing-from)

@@ -1,17 +1,18 @@
[MESSAGES CONTROL]
# For all codes, run 'pylint --list-msgs' or go to 'http://pylint-messages.wikidot.com/all-codes'
disable=
invalid-name,
cyclic-import,
Copy link
Member

Choose a reason for hiding this comment

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

I recommend adding explanation of why disable them.

Copy link
Member Author

Choose a reason for hiding this comment

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

Good suggestion, but let's keep it for now as this is only for azdev. CLI's pylintrc has detailed explanation.

Copy link
Member Author

Choose a reason for hiding this comment

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

I have removed unused items. The rest of them is self-explanatory.

.pylintrc Outdated Show resolved Hide resolved
.pylintrc Outdated Show resolved Hide resolved
@jiasli jiasli changed the title Bump pylint to 2.8.0 Bump pylint to 2.8.0 Apr 26, 2021
'pyyaml',
'requests',
'sphinx==1.6.7',
'tox',
'wheel==0.30.0',
'azure-multiapi-storage',
'isort==4.3.21'
Copy link
Contributor

Choose a reason for hiding this comment

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

Why remove 'isort==4.3.21'

Copy link
Member Author

@jiasli jiasli Apr 26, 2021

Choose a reason for hiding this comment

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

isort was pinned by #225 due to a similar issue as astroid (#294).

@jiasli jiasli merged commit d87a851 into Azure:dev Apr 26, 2021
@jiasli jiasli deleted the bump-pylint branch April 26, 2021 08:31
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.

None yet

3 participants