{{ message }}
adding static type checking to basic_binary_tree.py - #2293
Merged
Merged
Conversation
Contributor
Bennyhwanggggg
approved these changes
Aug 10, 2020
14 tasks
cclauss
requested changes
Aug 10, 2020
cclauss
left a comment
Member
There was a problem hiding this comment.
Let's focus our type hints on function parameters and return values unless mypy says it needs a type hint. We do not want too much typing clutter. If mypy can interprate the type from the context then we whould not repeat if because it slows down the reader. Too much typing information is clutter.
Why not automate this process of adding typing?
https://mypy.readthedocs.io/en/stable/existing_code.html#automate-annotation-of-legacy-code
|
Hey @kanthuc, TravisCI finished with status TravisBuddy Request Identifier: 1f45aa20-db4f-11ea-bc40-19e33457b5db |
cclauss
reviewed
Aug 11, 2020
cclauss
approved these changes
Aug 11, 2020
14 tasks
stokhos
pushed a commit
to stokhos/Python
that referenced
this pull request
Jan 3, 2021
* adding static type checking to basic_binary_tree.py * Add static type checking to functions with None return type * Applying code review comments * Added missing import statement * fix spaciing * "cleaned up depth_of_tree" * Add doctests and then streamline display() and is_full_binary_tree() Co-authored-by: Christian Clauss <cclauss@me.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Describe your change:
Adding static typing to basic_binary_tree.py towards issue #2128. If my changes are correct, I'll work on changes to more files
Checklist:
Fixes: #{$ISSUE_NO}.