-
Notifications
You must be signed in to change notification settings - Fork 238
Mypy hook #1123
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
…arison ID type alias
…arison ID type alias
maringuu
left a comment
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.
Overall lgtm but still some questions.
src/analysis/plugin/plugin.py
Outdated
| :param analyses: A dictionary of dependent analysis | ||
| :return: The analysis if anything was found. | ||
| :return: The analysis results (if there are any). |
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.
nit: why use parentheses?
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.
In general? 😅
I don't know, if you want I can remove them. I originally just wanted to specify that analysis results are returned.
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.
I meant that what is written in the parentheses is useful information and reads better without the parantheses.
src/analysis/plugin/plugin.py
Outdated
| 'summary': summary, | ||
| 'tags': tags_dict, | ||
| 'result': result.dict() if result else None, | ||
| 'result': result.dict() if isinstance(result, BaseModel) else 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.
Why is this needed?
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.
I think during the time I wasn't sure if the plugin always returns a BaseModel or if it can be a dict if no schema is specified. I think as it is now, the schema is mandatory and the plugin always returns a BaseModel, right?
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.
right?
Exactly!
maringuu
left a comment
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.
I had a brief look at everything but didn't look in depth.
I hope I found any actual code changes and reviewed them.
For the typing changes I'm happy when mypy is.
| from multiprocessing import Value | ||
| from helperFunctions.types import MpValue, MpArray | ||
|
|
||
| pass |
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.
Typo?
|
We decided to split this up into smaller PRs to make each one reviewable |
Uh oh!
There was an error while loading. Please reload this page.