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

Type Hints #61

Closed
JonathanWenger opened this issue Jun 26, 2020 · 2 comments
Closed

Type Hints #61

JonathanWenger opened this issue Jun 26, 2020 · 2 comments
Labels
improvement Improvements of existing functionality refactoring Refactoring of existing functionality

Comments

@JonathanWenger
Copy link
Contributor

All internal classes and methods should have type hints (https://docs.python.org/3/library/typing.html). This prevents pesky type bugs.

Example method with a str type hint:

def greeting(name: str) -> str:
    return 'Hello ' + name
@JonathanWenger JonathanWenger added refactoring Refactoring of existing functionality improvement Improvements of existing functionality labels Jun 26, 2020
@JonathanWenger JonathanWenger added this to the Initial Release milestone Jul 3, 2020
@pnkraemer
Copy link
Collaborator

Only the internal ones? Why not all visible ones? I would find it hard to distinguish purely internal functions from purely public functions but maybe I am not trying hard enough :)

@JonathanWenger
Copy link
Contributor Author

Closing as this is now standard practice when accepting PRs and no longer an active TODO.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
improvement Improvements of existing functionality refactoring Refactoring of existing functionality
Projects
None yet
Development

No branches or pull requests

2 participants