zulip / zulip-terminal

Official Zulip terminal client.
Apache License 2.0
635 stars 246 forks source link

Add type hints to `test_messages.py` #1337

Open neiljp opened 1 year ago

neiljp commented 1 year ago

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:

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.

zulipbot commented 1 year ago

Hello @zulip/server-refactoring members, this issue was labeled with the "area: refactoring" label, so you may want to check it out!

abdulmoiz37 commented 1 year ago

@zulipbot claim

zulipbot commented 1 year ago

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:

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 commented 1 year ago

@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!

abdulmoiz37 commented 1 year ago

@zulipbot I am working on this issue and it will be fixed soon

zulipbot commented 1 year ago

ERROR: Unexpected response from GitHub API.

SBNetto01 commented 1 year ago

@zulipbot claim --force

zulipbot commented 1 year ago

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:

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 commented 1 year ago

@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!

SBNetto01 commented 1 year ago

@zulipbot still working

SBNetto01 commented 1 year ago

@zulipbot claim

zulipbot commented 1 year ago

@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 commented 9 months ago

ERROR: Unexpected response from GitHub API.

Gyan313 commented 9 months ago

@zulipbot is this issue still active?

neiljp commented 8 months ago

@Gyan313 This issue is still active. The last work on this was #1407 by @SBNetto01.

rosefinchh commented 7 months ago

@zulipbot claim

zulipbot commented 7 months ago

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:

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)!

rosefinchh commented 7 months ago

@zulipbot abandon

Aryan51203 commented 7 months ago

@zulipbot claim

zulipbot commented 7 months ago

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:

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 commented 6 months ago

@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!

Aryan51203 commented 6 months ago

@zulipbot abandon

darksapien23151 commented 1 month ago

@zulipbot claim

zulipbot commented 1 month ago

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:

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)!