From 3948eeb960a4be02f29d23a3fcdab1b9ce60a7bb 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 | 9 +++++++++ .pre-commit-config.yaml | 4 ++++ b_asic/operation.py | 2 +- 3 files changed, 14 insertions(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 7bb855f9..0fce71c2 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -111,6 +111,15 @@ run-doc-test: - pip install -r requirements_doc.txt - sphinx-build -b html docs_sphinx public +run-lint: + variables: + QT_API: pyside2 + image: python:3.10 + stage: test + script: + - pip install black velin + - velin . --check --black + pages: variables: QT_API: pyqt5 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