Repository: RegioHelden/django-scrubber (language: python)

Issue:
Linting with flake8
Did some basic linting with flake8. Hope you agree with me on this one 🙂


Discussion / hints:
Feel free to add linting to the GitHub actions so that we will maintain a proper state in the future too.
I am not super familiar with github actions as we are using Gitlab. I saw in the docs that you need to set a python version. Which should I take there? Latest? 3.10?

But thx for merging!
The lowest supported Python version atm is 3.7 - I'd also base the linter on it.
@lociii Alright, I'll have a look the other day.

Fix patch:
diff --git a/.github/workflows/workflow.yaml b/.github/workflows/workflow.yaml
index d080341..62add90 100644
--- a/.github/workflows/workflow.yaml
+++ b/.github/workflows/workflow.yaml
@@ -8,6 +8,22 @@ env:
   GITHUB_WORKFLOW: true
 
 jobs:
+  flake8:
+    runs-on: ubuntu-20.04
+    steps:
+      - uses: actions/checkout@v2
+
+      - name: Set up Python 3.8
+        uses: actions/setup-python@v2
+        with:
+          python-version: 3.8
+
+      - name: Install required packages
+        run: pip install flake8 pep8-naming
+
+      - name: Run flake8
+        run: flake8
+
   test:
     name: Test and coverage
     runs-on: ubuntu-20.04


Test patch:
diff --git a/tests/test_scrubbers.py b/tests/test_scrubbers.py
index 5b0e5ef..e2d2eef 100644
--- a/tests/test_scrubbers.py
+++ b/tests/test_scrubbers.py
@@ -1,4 +1,3 @@
-import argparse
 from datetime import date, timedelta
 
 import django