-
-
Notifications
You must be signed in to change notification settings - Fork 659
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
Add function type information to functions in NVDAObjects/JAB/init.py #16953
Conversation
WalkthroughThe changes focus on enhancing type safety and code readability within the Changes
Sequence Diagram(s)sequenceDiagram
participant Developer
participant JABTextInfo
participant JAB
Developer->>JABTextInfo: Call _getOffsetFromPoint(x: int, y: int)
JABTextInfo-->>Developer: Returns int
Developer->>JABTextInfo: Call _getBoundingRectFromOffset(offset: int)
JABTextInfo-->>Developer: Returns RectLTWH
Developer->>JAB: Call findOverlayClasses(clsList)
JAB-->>Developer: Returns None
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (invoked as PR comments)
Additionally, you can add CodeRabbit Configuration File (
|
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.
Can you please do a double-check to confirm these suggestions are right?
Please also make sure to add full type information where possible
Yes. I'll do a double check on the suggestions. Can you confirm what you mean by full type information? Do you mean something like "tuple[int, int]" which you suggested? Thanks for the code review! |
yep exactly that, |
See test results for failed build of commit 2f3794eb57 |
See test results for failed build of commit 3e0124c8fb |
See test results for failed build of commit 60289d706f |
I reverted the RectLTRB change and fixed JABHandler.JABContext using a forward reference. That fixed (locally) the failed unit tests I was experiencing before. Thanks for the help! |
@seanbudd Thanks for the help with this. |
Link to issue number:
Progress towards #13835
Summary of the issue:
Functions in NVDAObjects/JAB/init.py lack type information.
Description of user facing changes
N/A
Description of development approach
Added type information to functions where type was apparent.
Testing strategy:
N/A
Known issues with pull request:
None known.
Code Review Checklist:
Summary by CodeRabbit
New Features
Improvements
JABTextInfo
andJAB
classes, making it easier for developers to understand method parameters and return types.