From 99cc44f26192f9c3a05069f9d36d5c221cfe94ed Mon Sep 17 00:00:00 2001
From: Jan Bernoth <jan.bernoth@uni-potsdam.de>
Date: Wed, 12 Apr 2023 13:58:13 +0200
Subject: [PATCH] #6 add pylint to CI/CD

close #6
---
 .gitlab-ci.yml | 9 +++++++++
 .pylintrc      | 3 +++
 src/main.py    | 6 +++---
 3 files changed, 15 insertions(+), 3 deletions(-)
 create mode 100644 .gitlab-ci.yml
 create mode 100644 .pylintrc

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
new file mode 100644
index 0000000..d01dc82
--- /dev/null
+++ b/.gitlab-ci.yml
@@ -0,0 +1,9 @@
+stages:
+  - lint
+
+pylint:
+  image: "python:latest"
+  stage: lint
+  script:
+    - pip install pylint
+    - pylint src/main.py
\ No newline at end of file
diff --git a/.pylintrc b/.pylintrc
new file mode 100644
index 0000000..89d57ce
--- /dev/null
+++ b/.pylintrc
@@ -0,0 +1,3 @@
+[MESSAGES CONTROL]
+
+disable = too-few-public-methods, too-many-branches, too-many-instance-attributes, import-error
\ No newline at end of file
diff --git a/src/main.py b/src/main.py
index d9679ed..d090159 100644
--- a/src/main.py
+++ b/src/main.py
@@ -602,9 +602,9 @@ class Plotter:
         fig.set_figheight(6.0)
 
         # plot the plot
-        boxprops = dict(linestyle='-', facecolor='k', linewidth=3, color='k')
-        medianprops = dict(linestyle='-', linewidth=3, color='b')
-        meanprops = dict(color='b')
+        boxprops = {'linestyle': '-', 'facecolor': 'k', 'linewidth': 3, 'color': 'k'}
+        medianprops = {'linestyle': '-', 'linewidth': 3, 'color': 'b'}
+        meanprops = {'color': 'b'}
         axes = fig.add_subplot(111)
         axes.axhspan(4, 7, facecolor='green', alpha=0.2)
         axes.axhspan(1, 4, facecolor='red', alpha=0.2)
-- 
GitLab