From 113f6b1db65c1c23f8e460bc61616e26a54464d2 Mon Sep 17 00:00:00 2001 From: Liam Steckler Date: Sat, 10 Feb 2024 20:43:40 -0800 Subject: [PATCH 1/2] Initial linting CI checks --- .woodpecker/lint.yml | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 .woodpecker/lint.yml diff --git a/.woodpecker/lint.yml b/.woodpecker/lint.yml new file mode 100644 index 0000000..1bc5a73 --- /dev/null +++ b/.woodpecker/lint.yml @@ -0,0 +1,10 @@ +when: + branch: main +steps: + - name: lint + image: python:3-alpine + commands: + - python -m pip install --upgrade pip + - python -m pip install -r requirements.txt + - python -m pip install ruff + - ruff check . \ No newline at end of file From b619c3bf2aa6761cbb71bf0c1b05eb6d3f27f30e Mon Sep 17 00:00:00 2001 From: Liam Steckler Date: Sat, 10 Feb 2024 20:51:41 -0800 Subject: [PATCH 2/2] Disable linting on SQL statement --- scl.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scl.py b/scl.py index 4987404..80aadd4 100644 --- a/scl.py +++ b/scl.py @@ -411,7 +411,7 @@ with Session(engine) as session: session.commit() lookup_active_outages_statement = select(SclOutage).where( - SclOutage.no_longer_in_response_time == None + SclOutage.no_longer_in_response_time == None # noqa: E711 - Syntax must stay this way for SQLAlchemy ) for active_outage in session.scalars(lookup_active_outages_statement): if (