Add type hints to LayeredActiveSpace#91
Open
arpitjain099 wants to merge 2 commits into
Open
Conversation
Annotate all method signatures and instance attributes in the LayeredActiveSpace class, matching the typing style already used in computation.py, helpers.py, and models.py. Signed-off-by: arpitjain099 <arpitjain099@gmail.com>
Collaborator
There was a problem hiding this comment.
I like adding type hints to more functions! It's a good quality of life/code style improvement and should make future dev work easier.
Can we use the most up to date style of type hints when adding new ones though? I will look to get together a style guide and include that as part of the CONTRIBUTING.md PR
| @@ -1,3 +1,5 @@ | |||
| from typing import Dict, Optional | |||
Collaborator
There was a problem hiding this comment.
this repo is on python3.12 - could we use a more modern type hint style? e.g. dict[<types>] instead of Dict[<types>] and <type> | None instead of Optional[<type>]
Contributor
Author
There was a problem hiding this comment.
Good catch, will update to use the 3.12+ style throughout. Pushing a fix now.
Replace Dict/Optional from typing with builtin dict and X | None union syntax per reviewer feedback. Signed-off-by: arpitjain099 <arpitjain099@gmail.com>
This was referenced Jul 9, 2026
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.
Adds type annotations to all methods and attributes in layered_active_space.py. Matches the annotation style already used in computation.py, helpers.py, and models.py. No logic changes.