-
Notifications
You must be signed in to change notification settings - Fork 19
[Feat] Add type hints #251
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
base: develop
Are you sure you want to change the base?
Conversation
|
Not quite done but already in decent shape for a review @s-kuberski @jkuhl-uni:
For now I ignored the |
|
Great, thanks a lot for all of your work! I'll have a look in the upcoming week. |
pyerrors/correlators.py
Outdated
| __slots__ = ["content", "N", "T", "tag", "prange"] | ||
|
|
||
| def __init__(self, data_input, padding=[0, 0], prange=None): | ||
| def __init__(self, data_input: Any, padding: list[int]=[0, 0], prange: Optional[list[int]]=None): |
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.
Shouldn't this be list[Obs]? Alternatively, in the list, there could be something Obs-like, I suppose, such as list[CObs]?
|
Hey @fjosw, |
|
I resolved the merge conflicts and fixed a few smaller issues but now one of the tests |
|
I had a look and found a solution for now, there are a few minor things to figure out. I hope to get it done today :) |
|
... well that was easy. |
|
Thanks a lot @jkuhl-uni ! As we have accumulated quite a few changes I would suggest that we all do a thorough review and then merge this first version with type hints which we can refine later @s-kuberski @jkuhl-uni . |
As a first step towards adding type hints, I added automatic type hints with monkeytype. Hints for the more complicated methods will need additional manual work but for the simpler methods this seems to have worked quite well.