diff --git a/.cirrus.yml b/.cirrus.yml index d68194dc8..8ef7f1767 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -132,9 +132,9 @@ task: folder: ~/.cache/pip fingerprint_script: echo Flake8 && echo $ELECTRUM_IMAGE && cat $ELECTRUM_REQUIREMENTS install_script: - - pip install flake8 + - pip install flake8 flake8-bugbear flake8_script: - - flake8 . --count --select=$ELECTRUM_LINTERS --show-source --statistics --exclude "*_pb2.py" + - flake8 . --count --select="$ELECTRUM_LINTERS" --ignore="$ELECTRUM_LINTERS_IGNORE" --show-source --statistics --exclude "*_pb2.py,electrum/_vendor/" env: ELECTRUM_IMAGE: python:3.8 ELECTRUM_REQUIREMENTS: contrib/requirements/requirements.txt @@ -144,10 +144,13 @@ task: # list of error codes: # - https://flake8.pycqa.org/en/latest/user/error-codes.html # - https://pycodestyle.pycqa.org/en/latest/intro.html#error-codes - ELECTRUM_LINTERS: E9,E101,E129,E273,E274,E703,E71,F63,F7,F82,W191,W29 + # - https://github.com/PyCQA/flake8-bugbear/tree/8c0e7eb04217494d48d0ab093bf5b31db0921989#list-of-warnings + ELECTRUM_LINTERS: E9,E101,E129,E273,E274,E703,E71,F63,F7,F82,W191,W29,B + ELECTRUM_LINTERS_IGNORE: B007,B009,B010,B019 - name: Flake8 Non-Mandatory env: - ELECTRUM_LINTERS: E,F,W,C90 + ELECTRUM_LINTERS: E,F,W,C90,B + ELECTRUM_LINTERS_IGNORE: "" allow_failures: true task: