Skip to content

Conversation

@amzhao16
Copy link
Collaborator

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

Copy link
Collaborator

@Chrisschmit Chrisschmit left a 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):
Copy link
Collaborator

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

Copy link
Collaborator Author

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,
Copy link
Collaborator

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

@amzhao16 amzhao16 requested review from Chrisschmit and sarahmish May 8, 2025 15:10
Copy link
Contributor

@sarahmish sarahmish left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm!

@amzhao16 amzhao16 merged commit a0db765 into main May 20, 2025
36 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants