From f4d78d9d2e3e08bcba6230046d22d4649bab0852 Mon Sep 17 00:00:00 2001 From: Avasam Date: Tue, 6 Aug 2024 12:56:52 -0400 Subject: [PATCH] Fix typo and get pyright version from lint script --- .github/workflows/lint-and-build.yml | 8 +++++++- pyproject.toml | 2 +- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/.github/workflows/lint-and-build.yml b/.github/workflows/lint-and-build.yml index bec662f7..c80e464b 100644 --- a/.github/workflows/lint-and-build.yml +++ b/.github/workflows/lint-and-build.yml @@ -78,10 +78,16 @@ jobs: cache-dependency-path: "scripts/requirements*.txt" - run: scripts/install.ps1 shell: pwsh + - name: Get pyright version + id: pyright_version + run: | + PYRIGHT_VERSION=$(grep '$pyrightVersion = ' 'scripts/lint.ps1' | cut -d "#" -f 1 | cut -d = -f 2 | cut -d "'" -f 2) + echo pyright version: "${PYRIGHT_VERSION}" + echo PYRIGHT_VERSION="${PYRIGHT_VERSION}" >> "${GITHUB_OUTPUT}" - name: Analysing the code with Pyright uses: jakebailey/pyright-action@v2 with: - version: "1.1.364" + version: ${{ steps.pyright_version.outputs.PYRIGHT_VERSION }} working-directory: src/ python-version: ${{ matrix.python-version }} Build: diff --git a/pyproject.toml b/pyproject.toml index c160de14..f72a1498 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -134,7 +134,7 @@ max-branches = 15 it doesn't support special characters. Use `utils.imread` instead. https://github.com/opencv/opencv/issues/4292#issuecomment-2266019697""" "cv2.imwrite".msg = """\ -it doesn't support special characters. . Use `utils.imwrite` instead. +it doesn't support special characters. Use `utils.imwrite` instead. https://github.com/opencv/opencv/issues/4292#issuecomment-2266019697""" # https://github.com/hhatto/autopep8#usage