Commit graph

11 commits

Author SHA1 Message Date
Ganesh Pawar 44b6fd395a tests: Fix tests failing on Windows.
Tests were failing on Windows since paths are case-insensitive on it.
This uses pathlib library to compare paths on all platforms.

Fixes #651
2021-03-04 11:28:35 -08:00
Anders Kaseorg b573c1daf3 lint: Replace pycodestyle with Flake8.
Flake8 combines pycodestyle with pyflakes and automatically gives us
support for noqa comments, parallelism, configuration files, plugins,
and easy editor integration.

Signed-off-by: Anders Kaseorg <anders@zulipchat.com>
2020-04-18 20:31:14 -07: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 4600ce59a3 Remove all remaining from __future__ imports. 2020-04-03 08:18:08 -04:00
rht 204871b518 Finish the remaining migration of shebang to python3. 2020-04-03 08:18:08 -04:00
Aman Agrawal 101049de27 lint: Add mypy as an external_linter to be run with ./tools/lint.
We were not running `mypy` with `./tools/lint` prior to this.
2020-01-14 16:00:24 -08:00
Aman 7f39201e79 lint: Use zulint as wrapper for running different linters. 2020-01-14 16:00:24 -08:00
derAnfaenger bcc1489bc5 testing: Make linter fail with exit code if any check fails. 2017-08-16 07:46:09 -07:00
derAnfaenger 428ded449e testing: Add custom linter rules. 2017-07-25 10:55:49 -07:00
Eeshan Garg 3d0f7955b6 api: Move the API package to a dedicated subdirectory.
In order to keep all three packages (zulip, zulip_bots,
zulip_botserver) in the same repo, all package files must now
be nested one level deeper.

For instance, python-zulip-api/zulip_bots/zulip_bots/bots/, instead
of python-zulip-api/zulip_bots/bots/.
2017-07-18 02:20:32 -02:30
Rohitt Vashishtha 1c8d359546 tools: Add pep8 linter.
This commit adds the tools/lint script to run the pep8 linter
as well as modifies .travis.yml to run the linter in Travis.
2017-07-06 19:58:50 -04:00