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

addition of type hints #43

Open
Anton-4 opened this issue Jan 24, 2019 · 2 comments
Open

addition of type hints #43

Anton-4 opened this issue Jan 24, 2019 · 2 comments

Comments

@Anton-4
Copy link
Collaborator

Anton-4 commented Jan 24, 2019

I personally love type hints.
They allow for better autocompletion and earlier error detection using mypy or PyCharm's integrated checker.

Proper type hints require python 3.6 but they can be stripped for reverse compatibility.

@PaulSchweizer how would you feel about the addition of type hints to flowpipe?
I would gladly do the work.

@PaulSchweizer
Copy link
Owner

Thanks for the idea @Anton-4 , I personally have never worked with type hints, but I do like the concept. We should get a "schema" for the nodes out of the box, at least to a certain extent, right? Like we could investigate the hints at runtime and provide infos on which input plug accepts which type? That would be helpful for the visualizer as well.
Only concern is the backwards compatibility, but if we can set up the stripping to be done automatically and publish a stripped version on pypi for py < 3.6, we should be good.

@Anton-4
Copy link
Collaborator Author

Anton-4 commented Jan 24, 2019

I completely agree :) .

Anton-4 pushed a commit to Anton-4/flowpipe that referenced this issue Jan 29, 2019
- added nox for auto-check of type hints in travis
- still need to add type hints to ascii_canvas for successful mypy run
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

No branches or pull requests

2 participants