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

Prepare for new azdev #6505

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .azure-pipelines/templates/azdev_setup.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ steps:
# clone azure-cli
git clone -q --single-branch -b dev https://github.com/Azure/azure-cli.git ../azure-cli
python -m pip install -U pip
pip install azdev
pip install git+https://github.com/dciborow/azure-cli-dev-tools.git@dciborow/pylint
azdev --version
azdev setup -c $CLI_REPO_PATH -r $CLI_EXT_REPO_PATH --debug
pip list -v
Expand Down
21 changes: 14 additions & 7 deletions .flake8
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,20 @@
max-line-length = 120
max-complexity = 10
ignore =
E501, # line too long, it is covered by pylint
E722, # bare except, bad practice, to be removed in the future
F401, # imported but unused, too many violations, to be removed in the future
F811, # redefinition of unused, to be removed in the future
C901 # code flow is too complex, too many violations, to be removed in the future
W503 # line break before binary operator effect on readability is subjective
W504 # line break after binary operator effect on readability is subjective
# line too long, it is covered by pylint
E501
# bare except, bad practice, to be removed in the future
E722
# imported but unused, too many violations, to be removed in the future
F401
# redefinition of unused, to be removed in the future
F811
# code flow is too complex, too many violations, to be removed in the future
C901
# line break after binary operator effect on readability is subjective
W504
# line break occurred before a binary operator
W503
Copy link
Contributor Author

@bebound bebound Jul 12, 2023

Choose a reason for hiding this comment

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

No idea why lots of W503 errors are raised in Static Analysis test.

/mnt/vss/_work/1/s/src/ssh/azext_ssh/ssh_info.py:144:26: W503 line break before binary operator
/mnt/vss/_work/1/s/src/datafactory/azext_datafactory/manual/custom.py:130:13: W503 line break before binary operator

exclude =
*/vendored_sdks
docs
Expand Down
27 changes: 16 additions & 11 deletions pylintrc
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,12 @@ disable=
invalid-name,
duplicate-code,
import-outside-toplevel,
too-many-lines
too-many-lines,
# These rules were added in Pylint >= 2.12, disable them to avoid making retroactive change
missing-timeout,
superfluous-parens,
implicit-str-concat,
unnecessary-dunder-call,

[TYPECHECK]
# For Azure CLI extensions, we ignore some import errors as they'll be available in the environment of the CLI
Expand Down Expand Up @@ -46,13 +51,13 @@ min-similarity-lines=10
# The invalid-name checker must be **enabled** for these hints to be used.
include-naming-hint=yes

module-name-hint=lowercase (keep short; underscores are discouraged)
const-name-hint=UPPER_CASE_WITH_UNDERSCORES
class-name-hint=CapitalizedWords
class-attribute-name-hint=lower_case_with_underscores
attr-name-hint=lower_case_with_underscores
method-name-hint=lower_case_with_underscores
function-name-hint=lower_case_with_underscores
argument-name-hint=lower_case_with_underscores
variable-name-hint=lower_case_with_underscores
inlinevar-name-hint=lower_case_with_underscores (short is OK)
module-naming-style=snake_case
const-naming-style=UPPER_CASE
class-naming-style=PascalCase
class-attribute-naming-style=snake_case
attr-naming-style=snake_case
method-naming-style=snake_case
function-naming-style=snake_case
argument-naming-style=snake_case
variable-naming-style=snake_case
inlinevar-naming-style=snake_case