Commit graph

8 commits

Author SHA1 Message Date
Anders Kaseorg 30f241a126 mypy: Remove unused type: ignore comments.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2021-03-04 15:09:58 -08:00
Anders Kaseorg 5428c5f296 typing: Convert function type annotations to Python 3 style.
Generated by com2ann (slightly patched to avoid also converting
assignment type annotations, which require Python 3.6), followed by
some manual whitespace adjustment, and two fixes for use-before-define
issues:

-    def set_zulip_client(self, zulipToJabberClient: ZulipToJabberBot) -> None:
+    def set_zulip_client(self, zulipToJabberClient: 'ZulipToJabberBot') -> None:

-def init_from_options(options: Any, client: Optional[str] = None) -> Client:
+def init_from_options(options: Any, client: Optional[str] = None) -> 'Client':

Signed-off-by: Anders Kaseorg <anders@zulipchat.com>
2020-04-18 20:31:14 -07:00
rht 439c096eac Remove all remaining six imports. 2020-04-03 08:18:08 -04:00
rht 565106b880 test_default_arguments: Add explicit python3 shebang. 2020-04-03 08:18:08 -04:00
rht 4600ce59a3 Remove all remaining from __future__ imports. 2020-04-03 08:18:08 -04:00
Shivam Gera fc1d134685 api: Use custom exceptions in API client.
This removes the use of RuntimeError, and replaces it with a custom
error class called ZulipError.  In a few places, we use a subclass to
make it easier for code to interact with the error type.
2018-02-16 11:33:18 -08:00
Alena Volkova fe6deb2e03 mypy: zulip: Fix errors in tests/test_default_arguments.py. 2017-10-27 00:56:06 -04:00
derAnfaenger fb2aff4611 zulip package: Add unittest
As the first unittest, this creates a test directory and
abnd adds it tho the excluded pip package files.

There are two `tests` directories now, one in zulip_botserver and one in
zulip. This confuses the unittest runner, leading to failed test imports.
Therefore, we need to tell the package importer that there are multiple
tests directories, all of which should be considered for a search.
2017-09-12 01:27:09 -07:00