-
Notifications
You must be signed in to change notification settings - Fork 0
Add node naming functionality #9
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
Chrisschmit
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.
Left some comments :)
| params: dict[str, int] = None, | ||
| num: int = 1): | ||
| num: int = 1, | ||
| names: list[str] = 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.
nit: add explicit typing:
params: Optional[dict[str, int]] = None,
names: Optional[list[str]] = 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.
do you recommend doing this with the "from typing import Optional" class? I'm not used to declaring typing with optional, and am getting "Call expression not allowed in type expressionPylancereportInvalidTypeForm" when doing it naively.
| def add_generators(self, | ||
| num: int = 1, | ||
| gen_type: str = "small", | ||
| params: dict[str, 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.
nit add typing same as above
sarahmish
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.
lgtm!
Allow "nicknames" of nodes - users can assign them abbreviated names that they can later reference when making lines, specifying loads to add pv system to, etc.
Added test in accordance with error handling