From 9a165f6addb8ad9e991ed211ca7222fcb7f4e1c6 Mon Sep 17 00:00:00 2001
From: Daniel Hornung <d.hornung@indiscale.com>
Date: Wed, 19 Jan 2022 17:13:33 +0100
Subject: [PATCH] STY: Fixed style mistake. Pipeline uses improved Makefile.

---
 .gitlab-ci.yml             |  8 ++++----
 Makefile                   | 11 +++++++++++
 unittests/test_apiutils.py |  2 +-
 3 files changed, 16 insertions(+), 5 deletions(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 72b4381a..9bb5adb6 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -40,18 +40,18 @@ code_style:
   tags: [ docker ]
   stage: code_style
   script:
-    - pycodestyle --count ./
+    - make style
   allow_failure: true
 
+# pylint tests for pycaosdb
 pylint:
   tags: [ docker ]
   stage: linting
   script:
-    - pylint --unsafe-load-any-extension=y -d all -e E,F src/caosdb/common
+    - make lint
   allow_failure: true
 
-
-# pylint tests for pycaosdb
+# run tests
 test:
   tags: [ docker ]
   stage: test
diff --git a/Makefile b/Makefile
index 4bc3459d..19233785 100644
--- a/Makefile
+++ b/Makefile
@@ -31,3 +31,14 @@ doc:
 
 install:
 	@echo "Not implemented yet, use pip for installation."
+
+check: style lint
+.PHONY: check
+
+style:
+	pycodestyle --count examples src unittests
+.PHONY: style
+
+lint:
+	pylint --unsafe-load-any-extension=y -d all -e E,F src/caosdb/common
+.PHONY: lint
diff --git a/unittests/test_apiutils.py b/unittests/test_apiutils.py
index 9cf9e1b7..b22a0ba3 100644
--- a/unittests/test_apiutils.py
+++ b/unittests/test_apiutils.py
@@ -145,7 +145,7 @@ def test_compare_entities():
     assert "tests_234234" in diff_r1["properties"]
     assert "tests_TT" in diff_r2["properties"]
 
-    
+
 def test_compare_entities_units():
     r1 = db.Record()
     r2 = db.Record()
-- 
GitLab