From aca7dd3bb78e95d62173a1db99db0bcab7089902 Mon Sep 17 00:00:00 2001
From: Dan Jones <danjon@noc.ac.uk>
Date: Tue, 20 Aug 2024 14:25:21 +0100
Subject: [PATCH] chore: add flake8 config

---
 .flake8 | 38 ++++++++++++++++++++++++++++++++++++++
 1 file changed, 38 insertions(+)
 create mode 100644 .flake8

diff --git a/.flake8 b/.flake8
new file mode 100644
index 0000000..4c5bdad
--- /dev/null
+++ b/.flake8
@@ -0,0 +1,38 @@
+[flake8]
+# Black formats code with max line length of 88
+# Bugbears B950 warning allows lines to be 10% longer than flake8's max
+max-line-length = 80
+
+# Errors and warnings to report
+select =
+    C,
+    E,
+    F,
+    W,
+    B,
+    # Allow max line length to be exceeded by 10% before warning.
+    B950
+
+# Errors and warnings to ignore
+ignore =
+    # Black puts space around slice operator which flake8 errors on.
+    E203,
+    # No error on max line length exceeded as B950 is doing this for us.
+    E501,
+    # Black puts line breaks before binary operators so don't warn this.
+    W503
+    B036
+    E999
+
+# Folders to ignore
+exclude =
+    .git,
+    *.pyc,
+    __pycache__,
+    ./docker,
+    ./docs,
+    ./kustomize
+    ./requirements.txt
+    ./requirements-dev.txt
+    ./CHANGELOG.md 
+    ./CONTRIBUTING.md
-- 
GitLab