-
-
Notifications
You must be signed in to change notification settings - Fork 273
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
tests: config: Add type annotations. #1099
Conversation
This commit replaces the data structure used for mentioning the keys of the various key bindings under `test_commands_for_random_tips` from `set` to `list` which is the right structure.
This commit adds parameter and return type annotations or hints to the `test_keys.py` file, that contains tests for its counterpart `keys.py` from the `zulipterminal` module, to make mypy checks consistent and improve code readability.
This commit adds `test_keys.py` to the `type_consistent_testfiles` list to check for type consistency with mypy.
This commit adds parameter and return type annotations or hints to the `test_themes.py` file, that contains tests for its counterpart `themes.py` from the `zulipterminal` module, to make mypy checks consistent and improve code readability.
This commit adds `test_themes.py` to the `type_consistent_testfiles` list to check for type consistency with mypy.
This commit renames the expanded `Color` Enum of `test_color_properties` to avoid conflict with the input `Color` Enum, to `ExpandedColor`.
This commit adds parameter and return type annotations or hints to the `test_color.py` file, that contains tests for it's counterpart `color.py` from the `zulipterminal` module, to make mypy checks consistent and improve code readability.
This commit adds `test_color.py` to the `type_consistent_testfiles` list to check for type consistency with mypy.
f58c66e
to
3637cb9
Compare
@prah23 This was a good choice to group together 👍 zulipbot thinks this is "large", but I'm unconvinced ;) Some of the commits are tiny here again, but I'm OK with this for these changes, for consistency with other similar commits. I've removed a few uses of Any and updated your rename from color -> ExpandedColor (to use CamelCase for the enum), and other than a few minor commit text adjustments this is good to merge and I'll do so shortly 🎉 |
Hello @zulip/server-refactoring members, this pull request was labeled with the "area: refactoring" label, so you may want to check it out! |
What does this PR do?
Adds type annotations to the
test_keys.py
,test_themes.py
andtest_color.py
files. Adds these files to the list inrun-mypy
.Tested?
Commit flow
bugfix: tests: keys: Use lists for keys of key bindings.
This commits replaces the data structure used for mentioning the keys
of the various key bindings under
test_commands_for_random_tips
fromset
tolist
which is the right structure.refactor: tests: keys: Add type annotations.
This commit adds parameter and return type annotations or hints
to the
test_keys.py
file, that contains tests for its counterpartkeys.py
from thezulipterminal
module, to make mypy checksconsistent and improve code readability.
tools: Include test_keys.py to be checked by mypy.
This commit adds
test_keys.py
to thetype_consistent_testfiles
list to check for type consistency with mypy.
Commits on Jul 25, 2021
refactor: tests: themes: Add type annotations.
This commit adds parameter and return type annotations or hints to the
test_themes.py
file, that contains tests for its counterpartthemes.py
from thezulipterminal
module, to make mypychecks consistent and improve code readability.
tools: Include test_themes.py to be checked by mypy.
This commit adds
test_themes.py
to thetype_consistent_testfiles
list to check for type consistency with mypy.
refactor: tests: color: Rename variable to avoid conflict with class.
This commit renames the
Color
variable oftest_color_properties
to avoid conflict with the
Color
class, to the namecolor
instead.
refactor: tests: color: Add type annotations.
This commit adds paramter and return type annotations or hints to the
test_color.py
file, that contains tests for it's counterpartcolor.py
from thezulipterminal
module, to make mypy checksconsistent and improve code readability.
tools: Include test_color.py to be checked by mypy.
This commit adds
test_color.py
to thetype_consistent_testfiles
list to check for type consistency with mypy.