Skip to content

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

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)

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.

invalid-name,
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)

# 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.

@jiasli jiasli changed the title Bump pylint to 2.8.0 Bump pylint to 2.8.0 Apr 26, 2021
'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.

3 participants