chore: add safe type hints for constants and returns (3 files)#510
Open
mangodxd wants to merge 1 commit intogoogle:mainfrom
Open
chore: add safe type hints for constants and returns (3 files)#510mangodxd wants to merge 1 commit intogoogle:mainfrom
mangodxd wants to merge 1 commit intogoogle:mainfrom
Conversation
|
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). View this failed invocation of the CLA check for more information. For the most up to date status, view the checks section at the bottom of the pull request. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Hello,
I noticed a few areas where the code could be slightly improved. This PR focuses on minor housekeeping tasks and does not change any of the existing runtime logic:
Type hint additions
conftest.py: added type hints to 3 function(s)papers/2024/GPAM/gpam_ecc_cm1.py: added type hints to 2 function(s)scaaml_intro/train.py: added type hints to 1 function(s)I have added strictly conservative type annotations based only on explicit primitive default values and singular return statements. Complex objects and dynamic references were purposefully ignored to avoid false positives.
Examples of changes
Example change in
conftest.py:Example change in
papers/2024/GPAM/gpam_ecc_cm1.py:Verification
ast.parse()to ensure no syntax errors were introduced.__init__.pyfiles.If anything looks incorrect, please feel free to adjust it or close the PR entirely. Thank you for maintaining this project!