From fbc6eed8b9b10845a31ddb498094b9cb741880e0 Mon Sep 17 00:00:00 2001
From: Oscar Gustafsson <oscar.gustafsson@gmail.com>
Date: Sat, 25 Feb 2023 18:47:38 +0100
Subject: [PATCH] Add doc-string linting with velin

---
 .gitlab-ci.yml          | 3 +++
 .pre-commit-config.yaml | 4 ++++
 b_asic/operation.py     | 2 +-
 3 files changed, 8 insertions(+), 1 deletion(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 7bb855f9..2d291940 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -110,6 +110,9 @@ run-doc-test:
   script:
     - pip install -r requirements_doc.txt
     - sphinx-build -b html docs_sphinx public
+    # Run linting on doc-strings
+    - pip install black velin
+    - velin . --check --black
 
 pages:
   variables:
diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml
index 0decc268..444f779d 100644
--- a/.pre-commit-config.yaml
+++ b/.pre-commit-config.yaml
@@ -18,3 +18,7 @@ repos:
     hooks:
       - id: isort
         name: isort (python)
+-   repo: https://github.com/Carreau/velin
+    rev: 0.0.12
+    hooks:
+    - id: velin
diff --git a/b_asic/operation.py b/b_asic/operation.py
index 67a95e83..3762c1b4 100644
--- a/b_asic/operation.py
+++ b/b_asic/operation.py
@@ -253,7 +253,7 @@ class Operation(GraphComponent, SignalSourceProvider):
             that are encountered, and be updated with their new values.
         prefix : str, optional
             Used as a prefix for the key string when storing results/delays.
-        bits_override ; int, optional
+        bits_override : int, optional
             Specifies a word length override when truncating inputs
             which ignores the word length specified by the input signal.
         truncate : bool, default: True
-- 
GitLab