Skip to content
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

energy volume curve - use axes = ("x", "y", "z") rather than axes = ["x", "y", "z"] #63

Merged
merged 1 commit into from
Nov 18, 2023

Conversation

jan-janssen
Copy link
Member

No description provided.

@jan-janssen jan-janssen linked an issue Nov 17, 2023 that may be closed by this pull request
Copy link
Member

@liamhuber liamhuber left a comment

Choose a reason for hiding this comment

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

Nice. The only thing is see is that the type hint probably needs to be more flexible, ie str str str, str str, or str. They could probably also be more specific with literals instead of str, but then the type hints for 2 and 1 cases each have multiple cases. At that point I'd probably define a custom type with all those cases, like axes_hint = typing.Union(tuple[Literal["x"{, ...), ...) or whatever, and then just hint the custom type. On the other hand that may be absolute overkill. I'm already content as-is, but just wanted to float the typing idea for your consideration.

@jan-janssen
Copy link
Member Author

@liamhuber I have to admit I am not really sure how the final type hint should look like. So if you want to make a suggestion or a stacked pull request I am happy to wait with merging this one, otherwise I would go ahead and merge this one as is.

@liamhuber
Copy link
Member

The hints are non binding in python anyhow; this one is by no means wrong, perhaps just narrower than the reality of the options; and I won't be able to get to it super fast -- so I'm fine with merging as is. Would you do me a favour and raise an issue linked to this and assign me to it though? Then I can get back to it.

@jan-janssen jan-janssen merged commit 4e59102 into main Nov 18, 2023
15 checks passed
@jan-janssen jan-janssen deleted the axes_tuple branch November 18, 2023 06:15
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.

Avoid mutable defaults
2 participants