zulip-terminal
zulip-terminal copied to clipboard
Add type hints to `test_messages.py`
Many of our tests have type hints, primarily on fixtures and the test function parameters, but we have some remaining exclusions, as noted in #1229.
It is worth noting that consistency between elements are not all checked by mypy or pytest right now, so attention to detail will be important.
This could be an ideal first issue for you, but likely only if you have a background in Python Type Hints and pytest.
That said, the parameters to these test functions generally come in one of 4 categories:
- parameters with default values: that makes determining the type to use more straightforward
- parameters from a parametrize decorator: check the data in the list of values above the function name
- our fixtures: these will be in the test file, or in
conftest.py
; look for the return type - other fixtures: this is something like
mocker
, which is aMockerFixture
frompytest_mock
While working, you'll want to disable excluding the file from being checked by mypy by removing that line from pyproject.toml
and adding to a separate commit before anything else. Check the commit log for the style used for other typing of test files (mainly by prah23).
It's likely worth working on one test function at a time in a separate commit, which we may squash together before merging. Once the file fully passes mypy cleanly, we can then move the first commit to the end, so that mypy doesn't complain before the file is fixed. That commit will then ensure that changes to that file will require type hints in future.
This is one element of #1229: please focus on this one file of that issue first, and if things go well, then you would be well situated to cover the remaining files later as followup PR(s). If you wish to work on a different file then please discuss in #zulip-terminal first.
Hello @zulip/server-refactoring members, this issue was labeled with the "area: refactoring" label, so you may want to check it out!
@zulipbot claim
Welcome to Zulip, @abdulmoiz37! We just sent you an invite to collaborate on this repository at https://github.com/zulip/zulip-terminal/invitations. Please accept this invite in order to claim this issue and begin a fun, rewarding experience contributing to Zulip!
Here's some tips to get you off to a good start:
- Join me on the Zulip developers' server, to get help, chat about this issue, and meet the other developers.
- Unwatch this repository, so that you don't get 100 emails a day.
As you work on this issue, you'll also want to refer to the Zulip code contribution guide, as well as the rest of the developer documentation on that site.
See you on the other side (that is, the pull request side)!
@abdulmoiz37 You have been unassigned from this issue because you have not made any updates for over 14 days. Please feel free to reclaim the issue if you decide to pick up again. Thanks!
@zulipbot I am working on this issue and it will be fixed soon
ERROR: Unexpected response from GitHub API.
@zulipbot claim --force
Welcome to Zulip, @SBNetto01! We just sent you an invite to collaborate on this repository at https://github.com/zulip/zulip-terminal/invitations. Please accept this invite in order to claim this issue and begin a fun, rewarding experience contributing to Zulip!
Here's some tips to get you off to a good start:
- Join me on the Zulip developers' server, to get help, chat about this issue, and meet the other developers.
- Unwatch this repository, so that you don't get 100 emails a day.
As you work on this issue, you'll also want to refer to the Zulip code contribution guide, as well as the rest of the developer documentation on that site.
See you on the other side (that is, the pull request side)!
@SBNetto01 You have been unassigned from this issue because you have not made any updates for over 14 days. Please feel free to reclaim the issue if you decide to pick up again. Thanks!
@zulipbot still working
@zulipbot claim
@SBNetto01 You have been unassigned from this issue because you have not made any updates for over 14 days. Please feel free to reclaim the issue if you decide to pick up again. Thanks!
ERROR: Unexpected response from GitHub API.
@zulipbot is this issue still active?
@Gyan313 This issue is still active. The last work on this was #1407 by @SBNetto01.
@zulipbot claim
Welcome to Zulip, @rosefinchh! We just sent you an invite to collaborate on this repository at https://github.com/zulip/zulip-terminal/invitations. Please accept this invite in order to claim this issue and begin a fun, rewarding experience contributing to Zulip!
Here's some tips to get you off to a good start:
- Join me on the Zulip developers' server, to get help, chat about this issue, and meet the other developers.
- Unwatch this repository, so that you don't get 100 emails a day.
As you work on this issue, you'll also want to refer to the Zulip code contribution guide, as well as the rest of the developer documentation on that site.
See you on the other side (that is, the pull request side)!
@zulipbot abandon
@zulipbot claim
Welcome to Zulip, @Aryan51203! We just sent you an invite to collaborate on this repository at https://github.com/zulip/zulip-terminal/invitations. Please accept this invite in order to claim this issue and begin a fun, rewarding experience contributing to Zulip!
Here's some tips to get you off to a good start:
- Join me on the Zulip developers' server, to get help, chat about this issue, and meet the other developers.
- Unwatch this repository, so that you don't get 100 emails a day.
As you work on this issue, you'll also want to refer to the Zulip code contribution guide, as well as the rest of the developer documentation on that site.
See you on the other side (that is, the pull request side)!
@Aryan51203 We noticed that you have not made any updates to this issue or linked PRs for 10 days. Please comment here if you are still actively working on it. Otherwise, we'd appreciate a quick @zulipbot abandon
comment so that someone else can claim this issue and continue from where you left off.
If we don't hear back, you will be automatically unassigned in 4 days. Thanks!
@zulipbot abandon
@zulipbot claim
Welcome to Zulip, @darksapien23151! We just sent you an invite to collaborate on this repository at https://github.com/zulip/zulip-terminal/invitations. Please accept this invite in order to claim this issue and begin a fun, rewarding experience contributing to Zulip!
Here's some tips to get you off to a good start:
- Join me on the Zulip developers' server, to get help, chat about this issue, and meet the other developers.
- Unwatch this repository, so that you don't get 100 emails a day.
As you work on this issue, you'll also want to refer to the Zulip code contribution guide, as well as the rest of the developer documentation on that site.
See you on the other side (that is, the pull request side)!