From 4647c73726965f73a90c43f77a9bba38b63d45bc Mon Sep 17 00:00:00 2001 From: bygu4 Date: Fri, 3 Jan 2025 17:24:44 +0300 Subject: [PATCH] add ruff to CI config --- .github/workflows/ci_extra.yml | 4 ++++ .github/workflows/ci_feature.yml | 4 ++++ .github/workflows/ci_master.yml | 4 ++++ pyrightconfig.json | 4 ++-- ruff.toml | 2 -- 5 files changed, 14 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci_extra.yml b/.github/workflows/ci_extra.yml index 7309c12..6b5e97e 100644 --- a/.github/workflows/ci_extra.yml +++ b/.github/workflows/ci_extra.yml @@ -31,6 +31,10 @@ jobs: - name: Lint with pycodestyle run: | pycodestyle pyformlang || true + - name: Lint with ruff + run: | + ruff check pyformlang || true + - name: Check with pyright run: | pyright --stats pyformlang diff --git a/.github/workflows/ci_feature.yml b/.github/workflows/ci_feature.yml index edf0626..6f52fb2 100644 --- a/.github/workflows/ci_feature.yml +++ b/.github/workflows/ci_feature.yml @@ -35,6 +35,10 @@ jobs: - name: Lint with pycodestyle run: | pycodestyle pyformlang || true + - name: Lint with ruff + run: | + ruff check pyformlang || true + - name: Check with pyright run: | pyright --stats pyformlang diff --git a/.github/workflows/ci_master.yml b/.github/workflows/ci_master.yml index 2ab30a8..ae56b0d 100644 --- a/.github/workflows/ci_master.yml +++ b/.github/workflows/ci_master.yml @@ -34,6 +34,10 @@ jobs: - name: Lint with pycodestyle run: | pycodestyle pyformlang || true + - name: Lint with ruff + run: | + ruff check pyformlang || true + - name: Check with pyright run: | pyright --stats pyformlang diff --git a/pyrightconfig.json b/pyrightconfig.json index 7fd2a49..c0e01ce 100644 --- a/pyrightconfig.json +++ b/pyrightconfig.json @@ -2,7 +2,7 @@ "include": [ "pyformlang" ], - + "exclude": [ "**/node_modules", "**/__pycache__", @@ -12,7 +12,7 @@ "pythonVersion": "3.8", "pythonPlatform": "Linux", - + "strictListInference": true, "strictSetInference": true, "strictDictionaryInference": true, diff --git a/ruff.toml b/ruff.toml index 9faafcd..2080912 100644 --- a/ruff.toml +++ b/ruff.toml @@ -1,5 +1,3 @@ -include = ["pyformlang"] - exclude = [ ".bzr", ".direnv",