diff --git a/.github/workflows/check_syntax.yml b/.github/workflows/check_syntax.yml
index d1128bb36..ded3062f3 100644
--- a/.github/workflows/check_syntax.yml
+++ b/.github/workflows/check_syntax.yml
@@ -6,5 +6,19 @@ jobs:
   build:
     runs-on: ubuntu-latest
     steps:
-    - name: Python Style Checker
-      uses: andymckay/pycodestyle-action@0.1.3
+    - name: Checkout
+      uses: actions/checkout@v2.2.0
+    - name: Setup Python
+      uses: actions/setup-python@v2
+      with:
+        python-version: 2.7
+    - name: Install Flake
+      run: |
+        python3 -m pip install flake8
+    - name: Lint with flake8
+      run: |
+        pip install flake8
+        # stop the build if there are Python syntax errors or undefined names
+        flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
+        # exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
+        flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics