From 5a97994d527a7bf1c417df546086df641ad58862 Mon Sep 17 00:00:00 2001 From: Evgenia Karunus Date: Tue, 6 May 2025 23:23:07 +0500 Subject: [PATCH 1/6] ruff.toml - update ruff rules --- ruff.toml | 23 ++++++++--------------- 1 file changed, 8 insertions(+), 15 deletions(-) diff --git a/ruff.toml b/ruff.toml index 0272688..9743725 100644 --- a/ruff.toml +++ b/ruff.toml @@ -37,8 +37,14 @@ target-version = "py39" [lint] # Enable Pyflakes (`F`) and a subset of the pycodestyle (`E`) codes by default. -# Note the formatter takes care of trailing commas -select = ["E4", "E7", "E9", "F", "W292"] +select = ["E4", "E7", "E9", "F", + # missing-newline-at-end-of-file + "W292", + # trailing commas + "COM812", "COM819", + # use double quotes + "Q000" +] ignore = [] # Allow fix for all enabled rules (when `--fix`) is provided. @@ -47,16 +53,3 @@ unfixable = [] # Allow unused variables when underscore-prefixed. dummy-variable-rgx = "^(_+|(_+[a-zA-Z0-9_]*[a-zA-Z0-9]+?))$" - -[format] -# Like Black, use double quotes for strings. -quote-style = "double" - -# Like Black, indent with spaces, rather than tabs. -indent-style = "space" - -# Like Black, respect magic trailing commas. -skip-magic-trailing-comma = false - -# Like Black, automatically detect the appropriate line ending. -line-ending = "auto" From 4965df7643c07db216e3620234f64892508f1836 Mon Sep 17 00:00:00 2001 From: Evgenia Karunus Date: Tue, 6 May 2025 23:23:51 +0500 Subject: [PATCH 2/6] lint.yaml - remove `ruff format` --- .github/workflows/lint.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/lint.yaml b/.github/workflows/lint.yaml index 9949c9c..500b2cd 100644 --- a/.github/workflows/lint.yaml +++ b/.github/workflows/lint.yaml @@ -8,4 +8,3 @@ jobs: - uses: actions/checkout@v4 - uses: astral-sh/ruff-action@v3 - run: ruff check - - run: ruff format --check From b430ff291d24eaec4b621a9551d40589db776be0 Mon Sep 17 00:00:00 2001 From: Evgenia Karunus Date: Tue, 6 May 2025 23:28:11 +0500 Subject: [PATCH 3/6] lint.yaml - show a banner on PRs whether linting passed --- .github/workflows/lint.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/lint.yaml b/.github/workflows/lint.yaml index 500b2cd..daa563f 100644 --- a/.github/workflows/lint.yaml +++ b/.github/workflows/lint.yaml @@ -1,5 +1,5 @@ name: lint -on: [push] +on: [push, pull_request] jobs: lint: From 3fdf96092e0a70d2a14c2d9af61ad8bb39bbd3a5 Mon Sep 17 00:00:00 2001 From: Evgenia Karunus Date: Wed, 7 May 2025 22:21:50 +0500 Subject: [PATCH 4/6] lint.yaml - add type checking --- .github/workflows/lint.yaml | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/.github/workflows/lint.yaml b/.github/workflows/lint.yaml index daa563f..69d3906 100644 --- a/.github/workflows/lint.yaml +++ b/.github/workflows/lint.yaml @@ -1,4 +1,5 @@ name: lint + on: [push, pull_request] jobs: @@ -8,3 +9,15 @@ jobs: - uses: actions/checkout@v4 - uses: astral-sh/ruff-action@v3 - run: ruff check + + typecheck: + runs-on: ubuntu-latest + steps: + - name: Set up Node.js + uses: actions/setup-node@v3 + with: + node-version: '16' + - name: Install Pyright + run: npm install -g pyright + - name: Run Pyright + run: pyright From d56f8ddbb29fea8ad1267e11734af12c0b4c8e61 Mon Sep 17 00:00:00 2001 From: Evgenia Karunus Date: Wed, 7 May 2025 22:26:06 +0500 Subject: [PATCH 5/6] lint.yaml - fix typecheck --- .github/workflows/lint.yaml | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/.github/workflows/lint.yaml b/.github/workflows/lint.yaml index 69d3906..00b86bb 100644 --- a/.github/workflows/lint.yaml +++ b/.github/workflows/lint.yaml @@ -9,15 +9,20 @@ jobs: - uses: actions/checkout@v4 - uses: astral-sh/ruff-action@v3 - run: ruff check - + typecheck: runs-on: ubuntu-latest steps: - - name: Set up Node.js - uses: actions/setup-node@v3 + - uses: actions/checkout@v4 # Make sure this is included + - name: Set up Python + uses: actions/setup-python@v4 with: - node-version: '16' - - name: Install Pyright - run: npm install -g pyright + python-version: '3.x' # Specify your version + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install -r requirements.txt # Or your dependency file - name: Run Pyright - run: pyright + uses: jakebailey/pyright-action@v2 + with: + project: ./pyrightconfig.json # If you have a config file From 1d121d9ebdc062e7e45192d8d5be00b1548902c2 Mon Sep 17 00:00:00 2001 From: Evgenia Karunus Date: Wed, 7 May 2025 22:34:52 +0500 Subject: [PATCH 6/6] lint.yaml - temporarily comment out --- .github/workflows/lint.yaml | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/.github/workflows/lint.yaml b/.github/workflows/lint.yaml index 00b86bb..87810c6 100644 --- a/.github/workflows/lint.yaml +++ b/.github/workflows/lint.yaml @@ -10,19 +10,19 @@ jobs: - uses: astral-sh/ruff-action@v3 - run: ruff check - typecheck: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 # Make sure this is included - - name: Set up Python - uses: actions/setup-python@v4 - with: - python-version: '3.x' # Specify your version - - name: Install dependencies - run: | - python -m pip install --upgrade pip - pip install -r requirements.txt # Or your dependency file - - name: Run Pyright - uses: jakebailey/pyright-action@v2 - with: - project: ./pyrightconfig.json # If you have a config file + # typecheck: + # runs-on: ubuntu-latest + # steps: + # - uses: actions/checkout@v4 # Make sure this is included + # - name: Set up Python + # uses: actions/setup-python@v4 + # with: + # python-version: '3.x' # Specify your version + # - name: Install dependencies + # run: | + # python -m pip install --upgrade pip + # pip install -r requirements.txt # Or your dependency file + # - name: Run Pyright + # uses: jakebailey/pyright-action@v2 + # with: + # project: ./pyrightconfig.json # If you have a config file