Repository: BrkRaw/brkraw (language: python)

Issue:
add some style guide lines
- linting with autopep8 or flake8 or ruff or something else
- add some auto-formatting with black or blue


Discussion / hints:
there is github action to do some flake8 check but no local flake8 config or way to enforce this at commit time (with something like pre-commit)

Fix patch:
diff --git a/.flake8 b/.flake8
new file mode 100644
index 0000000..43e2629
--- /dev/null
+++ b/.flake8
@@ -0,0 +1,10 @@
+[flake8]
+exclude =
+    .git,
+    __pycache__,
+    build,
+    dist,
+	env,
+	venv,
+max-line-length = 127
+max-complexity=10
\ No newline at end of file
diff --git a/.github/workflows/main.yml b/.github/workflows/flake8.yml
similarity index 65%
rename from .github/workflows/main.yml
rename to .github/workflows/flake8.yml
index bbca626..10069d2 100644
--- a/.github/workflows/main.yml
+++ b/.github/workflows/flake8.yml
@@ -1,31 +1,32 @@
-name: CI workflow
+name: flake8
 
 on:
   # this workflow triggered on below condition [push, pull_request]
   push:
-    branches: [ master ]
+    branches: [ main ]
   pull_request:
-    branches: [ master ]
+    branches: [ '*' ]
+
+# cancel previous similar workflow runs
+concurrency:
+  group: ${{ github.workflow }}-${{ github.ref }}
+  cancel-in-progress: true
 
 jobs:
   build:
 
     runs-on: ubuntu-latest
-    strategy:
-      matrix:
-        python-version: [3.5, 3.6, 3.7, 3.8]
 
     steps:
     - uses: actions/checkout@v2
-    - name: Set up python ${{ matrix.python-version }}
+    - name: Set up python
       uses: actions/setup-python@v2
       with:
-        python-version: ${{ matrix.python-version }}
+        python-version: "3.11"
     - name: Install dependencies
       run: |
         python -m pip install --upgrade pip
-        pip install flake8 pytest
-        if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
+        pip install flake8
     - name: Lint with flake8
       run: |
         # stop the build if there are Python syntax errors or undefined names


Test patch:
diff --git a/.github/workflows/autotest.yml b/.github/workflows/autotest.yml
index bbca626..e69c11e 100644
--- a/.github/workflows/autotest.yml
+++ b/.github/workflows/autotest.yml
@@ -1,4 +1,4 @@
-name: CI workflow
+name: test
 
 on:
   # this workflow triggered on below condition [push, pull_request]