Merge #16124: tests: Limit Python linting to files in the repo
3c5254a820
Limit Python linting to files in the repo (practicalswift) Pull request description: Limit Python linting to files in the repo. Before: ``` $ test/lint/lint-python.sh not_under_version_control.py:195:9: F841 local variable 'e' is assigned to but never used $ ``` After: ``` $ test/lint/lint-python.sh $ ``` ACKs for commit 3c5254: fanquake: tACK3c5254a820
Empact: utACK3c5254a820
Tree-SHA512: 68733494a5f2a7764eba938af227145f5ef9ddc9ff94840134e4d2684ca7b9a819fac491ec43102f93e5e9867373bfd46b46efc9d11528329b5ecb2282fffb16
This commit is contained in:
commit
d3a1c2502b
1 changed files with 7 additions and 1 deletions
|
@ -90,4 +90,10 @@ elif PYTHONWARNINGS="ignore" flake8 --version | grep -q "Python 2"; then
|
|||
exit 0
|
||||
fi
|
||||
|
||||
PYTHONWARNINGS="ignore" flake8 --ignore=B,C,E,F,I,N,W --select=$(IFS=","; echo "${enabled[*]}") "${@:-.}"
|
||||
PYTHONWARNINGS="ignore" flake8 --ignore=B,C,E,F,I,N,W --select=$(IFS=","; echo "${enabled[*]}") $(
|
||||
if [[ $# == 0 ]]; then
|
||||
git ls-files "*.py"
|
||||
else
|
||||
echo "$@"
|
||||
fi
|
||||
)
|
||||
|
|
Loading…
Add table
Reference in a new issue