-
-
Notifications
You must be signed in to change notification settings - Fork 208
Update mypy/pre-commit, fix new issues #3602
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
Conversation
📝 WalkthroughWalkthroughTooling and CI version bumps; gen_stubs.py adds a fmt_list helper and uses it to emit all entries. Many pygame stub modules gain explicit all lists. Several stub classes change from init signatures to new. stubtest gets a new flag and minor C comment formatting was adjusted. Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Pre-merge checks and finishing touches❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro 📒 Files selected for processing (16)
🚧 Files skipped from review as they are similar to previous changes (9)
🧰 Additional context used🧠 Learnings (1)📚 Learning: 2025-10-08T08:15:01.390Z
Applied to files:
🧬 Code graph analysis (1)buildconfig/stubs/pygame/pixelarray.pyi (2)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (6)
🔇 Additional comments (2)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
3a6839f
to
1c20063
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 4
📜 Review details
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (16)
.github/workflows/build-ubuntu-sdist.yml
(1 hunks).pre-commit-config.yaml
(3 hunks)buildconfig/stubs/gen_stubs.py
(3 hunks)buildconfig/stubs/pygame/bufferproxy.pyi
(1 hunks)buildconfig/stubs/pygame/constants.pyi
(1 hunks)buildconfig/stubs/pygame/freetype.pyi
(1 hunks)buildconfig/stubs/pygame/joystick.pyi
(1 hunks)buildconfig/stubs/pygame/locals.pyi
(1 hunks)buildconfig/stubs/pygame/midi.pyi
(1 hunks)buildconfig/stubs/pygame/pixelarray.pyi
(1 hunks)buildconfig/stubs/pygame/sndarray.pyi
(1 hunks)buildconfig/stubs/pygame/surfarray.pyi
(1 hunks)buildconfig/stubs/pygame/version.pyi
(1 hunks)buildconfig/stubs/stubcheck.py
(1 hunks)dev.py
(1 hunks)src_c/SDL_gfx/SDL_gfxPrimitives.c
(1 hunks)
✅ Files skipped from review due to trivial changes (1)
- buildconfig/stubs/pygame/version.pyi
🚧 Files skipped from review as they are similar to previous changes (9)
- buildconfig/stubs/gen_stubs.py
- .pre-commit-config.yaml
- buildconfig/stubs/stubcheck.py
- buildconfig/stubs/pygame/constants.pyi
- buildconfig/stubs/pygame/sndarray.pyi
- buildconfig/stubs/pygame/bufferproxy.pyi
- buildconfig/stubs/pygame/joystick.pyi
- src_c/SDL_gfx/SDL_gfxPrimitives.c
- buildconfig/stubs/pygame/freetype.pyi
🧰 Additional context used
🧬 Code graph analysis (1)
buildconfig/stubs/pygame/pixelarray.pyi (2)
src_py/__init__.py (2)
Surface
(227-228)PixelArray
(253-254)buildconfig/stubs/pygame/surface.pyi (1)
Surface
(42-1051)
🪛 GitHub Actions: Ubuntu sdist
dev.py
[error] 1-1: Process exited with code 1 during stub generation: git shows uncommitted changes after running stubs (e.g., generated files '1.21.0' and 'sdlaudio.raw'). Commit the changes or run 'python3 dev.py stubs' followed by a commit, or run 'python3 dev.py all' to catch more issues.
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (10)
- GitHub Check: x86_64
- GitHub Check: arm64
- GitHub Check: x86
- GitHub Check: AMD64
- GitHub Check: Debian (Bookworm - 12) [armv6]
- GitHub Check: Debian (Bookworm - 12) [s390x]
- GitHub Check: Debian (Bookworm - 12) [ppc64le]
- GitHub Check: Debian (Bookworm - 12) [armv7]
- GitHub Check: debug_coverage (ubuntu-24.04, 3.13.5)
- GitHub Check: i686
🔇 Additional comments (3)
dev.py (1)
199-201
: LGTM! Development dependency versions updated.The version bumps align with the PR objective of updating mypy to 1.18.2 for Python 3.14 support, along with pylint and pre-commit updates.
.github/workflows/build-ubuntu-sdist.yml (1)
67-67
: Workflow simplification approved.Replacing the explicit mypy installation and stubcheck invocation with
python3 dev.py stubs
centralizes the stub testing logic and aligns with the updated dev.py dependencies (mypy==1.18.2).Note: This change is related to the pipeline failure mentioned in dev.py. Ensure the issue with uncommitted files generated during stub testing is resolved before merging.
buildconfig/stubs/pygame/pixelarray.pyi (1)
36-36
: Constructor stub switched to new. Aligns with similar pygame stubs for accurate mypy typing; confirm that PixelArray’s C implementation uses new so the stub matches runtime behavior.
1c20063
to
a3ec9ac
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure lol
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
The mypy update is needed for full 3.14 support, old mypy was raising false positive issues.
With the update, I had to make fixes for the new issues mypy raises.
Finally, I also took the opportunity to update pre-commit/pylint.