Skip to content

Pin requests and allow pyright warnings #193

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 14, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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