From 16326b7aacaff4f6f00750ff55be48670e66e6f7 Mon Sep 17 00:00:00 2001 From: Lukas Barragan Torres Date: Sun, 3 Mar 2024 15:14:05 +0100 Subject: [PATCH 1/5] add pre-commit config --- backend/.pre-commit-config.yaml | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 backend/.pre-commit-config.yaml diff --git a/backend/.pre-commit-config.yaml b/backend/.pre-commit-config.yaml new file mode 100644 index 00000000..1cd9df2f --- /dev/null +++ b/backend/.pre-commit-config.yaml @@ -0,0 +1,13 @@ +repos: + - repo: local + hooks: + - id: ruff-check + name: ruff check + entry: ruff check + language: system + types: [python] + - id: pyright + name: pyright + entry: pyright + language: node + types: [python] \ No newline at end of file From 0829bbd82f496d096764622221686e6b6112d16d Mon Sep 17 00:00:00 2001 From: Lukas Barragan Torres Date: Sun, 3 Mar 2024 15:16:20 +0100 Subject: [PATCH 2/5] allways run ruff and pyright --- backend/.pre-commit-config.yaml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/backend/.pre-commit-config.yaml b/backend/.pre-commit-config.yaml index 1cd9df2f..8d84e953 100644 --- a/backend/.pre-commit-config.yaml +++ b/backend/.pre-commit-config.yaml @@ -6,8 +6,10 @@ repos: entry: ruff check language: system types: [python] + always_run: true - id: pyright name: pyright entry: pyright language: node - types: [python] \ No newline at end of file + types: [python] + always_run: true \ No newline at end of file From 54e35295b20e15b3211daa3e3f2ab9f5a67ecb47 Mon Sep 17 00:00:00 2001 From: Lukas Barragan Torres Date: Sun, 3 Mar 2024 15:18:26 +0100 Subject: [PATCH 3/5] better hook names and no + node -> system language --- backend/.pre-commit-config.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/backend/.pre-commit-config.yaml b/backend/.pre-commit-config.yaml index 8d84e953..fbd27e2b 100644 --- a/backend/.pre-commit-config.yaml +++ b/backend/.pre-commit-config.yaml @@ -2,14 +2,14 @@ repos: - repo: local hooks: - id: ruff-check - name: ruff check + name: ruff linting check entry: ruff check language: system types: [python] always_run: true - id: pyright - name: pyright + name: pyright linting check entry: pyright - language: node + language: system types: [python] always_run: true \ No newline at end of file From fb5741860513a332088003246bb58cb5ca410194 Mon Sep 17 00:00:00 2001 From: Lukas Barragan Torres Date: Sun, 3 Mar 2024 15:22:10 +0100 Subject: [PATCH 4/5] add pre-commit to requirements --- backend/requirements.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/backend/requirements.txt b/backend/requirements.txt index dbd63a55..d44751ce 100644 --- a/backend/requirements.txt +++ b/backend/requirements.txt @@ -8,6 +8,7 @@ greenlet==3.0.3 h11==0.14.0 idna==3.6 nodeenv==1.8.0 +pre-commit==3.6.2 psycopg2-binary==2.9.9 pydantic==2.6.3 pydantic_core==2.16.3 From 016662019a7ff893979141688debaffd46a52a4c Mon Sep 17 00:00:00 2001 From: Lukas Barragan Torres Date: Sun, 3 Mar 2024 15:43:33 +0100 Subject: [PATCH 5/5] pyright version update --- backend/requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/requirements.txt b/backend/requirements.txt index d44751ce..66727a6a 100644 --- a/backend/requirements.txt +++ b/backend/requirements.txt @@ -12,7 +12,7 @@ pre-commit==3.6.2 psycopg2-binary==2.9.9 pydantic==2.6.3 pydantic_core==2.16.3 -pyright==1.1.351 +pyright==1.1.352 ruff==0.2.2 setuptools==69.1.1 sniffio==1.3.1