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

refactor: type hints not very informative #28

Open
inspiralpatterns opened this issue Jul 13, 2023 · 0 comments
Open

refactor: type hints not very informative #28

inspiralpatterns opened this issue Jul 13, 2023 · 0 comments
Labels
good first issue Good for newcomers

Comments

@inspiralpatterns
Copy link
Collaborator

inspiralpatterns commented Jul 13, 2023

def generate(self, inputs: dict[str, Any]) -> tuple[Any, Any, Any]:

I find using Any everywhere generally frowned upon: you want to use type hints to leverage the power of a static type checker such as e.g. mypy and for better documentation. Having a Tuple that can give you elements of any type does not provide much information and does not help much in telling the type checker what you really expect as output.

@stoyan-stoyanov stoyan-stoyanov self-assigned this Jul 16, 2023
@stoyan-stoyanov stoyan-stoyanov added the good first issue Good for newcomers label Jul 28, 2023
@stoyan-stoyanov stoyan-stoyanov removed their assignment Jul 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants