diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index eb0499c32d..9dcbed9edb 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -36,7 +36,7 @@ jobs: external/bin selfdrive/modeld/runners $TEST_DIR # need these so docker copy won't fail - cp Pipfile Pipfile.lock flake8_openpilot.sh pylint_openpilot.sh .pylintrc \ + cp Pipfile Pipfile.lock pylint_openpilot.sh .pylintrc \ cppcheck_openpilot.sh .coveragerc-app .pre-commit-config.yaml $TEST_DIR cd $TEST_DIR mkdir laika laika_repo tools release @@ -73,8 +73,6 @@ jobs: submodules: true - name: Build Docker image run: eval "$BUILD" - - name: flake8 - run: $RUN "cd /tmp/openpilot/ && ./flake8_openpilot.sh" - name: pylint run: $RUN "cd /tmp/openpilot/ && ./pylint_openpilot.sh" - name: pre-commit diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index e101650d49..b8564c1e85 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -22,7 +22,7 @@ All PRs and commits are automatically checked by Github Actions. Check out `.git ### Code Style and Linting -Code is automatically checked for style by Github Actions as part of the automated tests. You can also run these tests yourself by running `pylint_openpilot.sh` and `flake8_openpilot.sh`. +Code is automatically checked for style by Github Actions as part of the automated tests. You can also run these tests yourself by running `pre-commit run --all`. ## Car Ports (openpilot) diff --git a/Dockerfile.openpilot b/Dockerfile.openpilot index 0ef6912418..d2956b8104 100644 --- a/Dockerfile.openpilot +++ b/Dockerfile.openpilot @@ -78,7 +78,6 @@ RUN mkdir -p /tmp/openpilot COPY SConstruct \ cppcheck_openpilot.sh \ - flake8_openpilot.sh \ pylint_openpilot.sh \ .pylintrc \ .pre-commit-config.yaml \ diff --git a/flake8_openpilot.sh b/flake8_openpilot.sh deleted file mode 100755 index a2d99655cf..0000000000 --- a/flake8_openpilot.sh +++ /dev/null @@ -1,9 +0,0 @@ -#!/usr/bin/env bash - -# only pyflakes check (--select=F) -RESULT=$(python3 -m flake8 --select=F $(eval echo $(cat <(find cereal) <(find opendbc) release/files_common release/files_common | tr '\n' ' ') | tr ' ' '\n' | grep "\.py$")) -if [[ $RESULT ]]; then - echo "Pyflakes found errors in the code. Please fix and try again" - echo "$RESULT" - exit 1 -fi