tests: helper: Add type annotations. #1083
Merged
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.
What does this PR do?
Adds type annotations to
test_helper.py
. I've also added a prior bugfix commit changingmuted_streams
' data structure from List to Set and a final follow up commit to includetest_helper.py
in the list of files being checked byrun-mypy
.Tested?
Commit flow
bugfix: tests: helper: Use Sets as params for muted_streams.
This commits changes the previous incorrect configuration of
Lists
to the
muted_streams
parameter intest_classify_unread_counts
which is assigned model's muted_streams, to
Set
s instead, which isthe appropriate data structure.
refactor: tests: helper: Add type annotations.
This commit adds parameter and return type annotations or hints
to the
test_helper.py
file, that contains tests for its counterparthelper.py
from thezulipterminal
module, to make mypy checksconsistent and improve code readability.
tools: Include test_helper.py to be checked by mypy.
This commit adds
test_helper.py
to thetype_consistent_testfiles
list to check for type consistency with mypy.