Skip to content

Commit

Permalink
pin requests and allow pyright warnings (#193)
Browse files Browse the repository at this point in the history
  • Loading branch information
Avasam authored Jan 14, 2023
1 parent e154acc commit 5fcf7ab
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 5 deletions.
1 change: 0 additions & 1 deletion .github/workflows/lint-and-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,6 @@ jobs:
uses: jakebailey/pyright-action@v1
with:
working-directory: src/
extra-args: --warnings
Pylint:
runs-on: windows-latest
strategy:
Expand Down
4 changes: 3 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ ignore = [
# https://github.com/microsoft/pyright/blob/main/docs/configuration.md#sample-pyprojecttoml-file
[tool.pyright]
typeCheckingMode = "strict"
# Prefer `pyright: ignore`
enableTypeIgnoreComments = false
# Extra strict
reportImplicitStringConcatenation = "error"
reportCallInDefaultInitializer = "error"
Expand All @@ -21,7 +23,7 @@ reportUninitializedInstanceVariable = "error"
reportUnnecessaryTypeIgnoreComment = "error"
# Exclude from scanning when running pyright
exclude = [
# Auto generated, produces unecessary `# type: ignore`
# Auto generated, fails some strict pyright checks
"src/gen/",
]
# Ignore must be specified for Pylance to stop displaying errors
Expand Down
2 changes: 1 addition & 1 deletion scripts/lint.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ add-trailing-comma $(git ls-files '**.py*') --py36-plus

Write-Host "`nRunning Pyright..."
$Env:PYRIGHT_PYTHON_FORCE_VERSION = 'latest'
pyright src/ --warnings
pyright src/
$exitCodes += $LastExitCode
if ($LastExitCode -gt 0) {
Write-Host "`Pyright failed ($LastExitCode)" -ForegroundColor Red
Expand Down
4 changes: 2 additions & 2 deletions scripts/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,13 @@ git+https://github.com/boppreh/keyboard.git#egg=keyboard # Fix install on macos
numpy>=1.23.2 # Python 3.11 wheels
opencv-python-headless>=4.6 # Breaking changes importing cv2.cv2
packaging
Pillow>=9.2 # gnome-screeshot checks
Pillow>=9.2 # gnome-screeshot checks
psutil
PyAutoGUI
# 6.4.1 fixes the rare Illegal Operation issue from RTADan, but the dev wheels are currently broken :/
# 2.0.0-beta.2 contains the fixes if anyone needs it.
PyQt6>=6.4.0 # Python 3.11 support
requests
requests<=2.28.1 # 2.28.2 has issues with PyInstaller https://github.com/pyinstaller/pyinstaller-hooks-contrib/issues/534
toml
#
# Build and compile resources
Expand Down

0 comments on commit 5fcf7ab

Please sign in to comment.