Skip to content

Commit

Permalink
Fix typo and get pyright version from lint script
Browse files Browse the repository at this point in the history
  • Loading branch information
Avasam committed Aug 6, 2024
1 parent a4cd263 commit 376795b
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
12 changes: 11 additions & 1 deletion .github/workflows/lint-and-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -78,10 +78,20 @@ 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}"
if [ "$PYRIGHT_VERSION" = "latest" ]; then
PYRIGHT_VERSION=
fi
echo PYRIGHT_VERSION="${PYRIGHT_VERSION}" >> "${GITHUB_OUTPUT}"
shell: bash
- 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:
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 376795b

Please sign in to comment.