Gordon P. Hemsley
aace1c5bc9
Switch tools/update-prod-static from optparse to argparse.
2016-09-12 12:00:16 -07:00
Gordon P. Hemsley
9755f3f302
Switch tools/test-tools from optparse to argparse.
2016-09-12 12:00:16 -07:00
Gordon P. Hemsley
9b47f4ab3a
Switch tools/minify-js from optparse to argparse.
2016-09-12 12:00:16 -07:00
Gordon P. Hemsley
1e9a4b2bab
Switch tools/check-templates from optparse to argparse.
2016-09-12 12:00:16 -07:00
Gordon P. Hemsley
fc6f72174b
Switch tools/find-add-class from optparse to argparse.
2016-09-12 12:00:16 -07:00
Tim Abbott
9b867be075
mypy: Exclude api/zulip/__init__.py so we can start enforcing.
2016-09-12 09:03:50 -07:00
Tim Abbott
1eb16d03a2
Finish annotating template/css parsers and tests.
2016-09-12 09:03:50 -07:00
Tim Abbott
e580ed579b
Finish annotating zerver/views/messages.py.
...
These annotations aren't perfect because the sqlalchemy stubs in
typeshed are broken (e.g. a `Select` doesn't have the ability to do
`.where()`, but we've at least used some typevars to make it easy to
address that when the sqlalchemy stubs are less broken).
2016-09-12 08:47:52 -07:00
Tim Abbott
e5b8ad6666
Fix teamcity.py annotations.
2016-09-12 08:30:42 -07:00
Tim Abbott
d964e5595a
Finish annotating test_helpers.py.
2016-09-12 08:29:34 -07:00
Steve Howell
cdee3dfb53
Annotate test_helpers.instrument_url().
2016-09-12 08:21:46 -07:00
Steve Howell
ffec98d85c
Annotate zerver/lib/export.py.
...
This adds the remaining annotations to lib/export.py.
2016-09-12 08:21:46 -07:00
Steve Howell
62dd86bcce
mypy: Set Path to str instead of text_type in export.py.
...
Using text_type for Path just breaks a lot of calls to
the core Python libraries that still want strings.
2016-09-12 08:21:46 -07:00
Steve Howell
b2ae2dc7cc
Exclude contrib_bots from run-mypy.
2016-09-12 08:21:46 -07:00
Umair Khan
593779a3b0
Annotate zerver/tests/test_push_notifications.py.
2016-09-12 08:10:50 -07:00
Umair Khan
c231a440cd
Annotate zerver/templatetags/minified_js.py.
2016-09-12 08:10:50 -07:00
Umair Khan
29c24d540f
Annotate zerver/templatetags/app_filters.py.
2016-09-12 08:10:50 -07:00
Umair Khan
b4eb3a55be
Annotate zerver/management/commands/realm_emoji.py.
2016-09-12 08:10:50 -07:00
Umair Khan
f8c904e611
Annotate zerver/management/commands/deliver_email.py.
2016-09-12 08:10:50 -07:00
Umair Khan
c096473e06
Annotate zerver/management/commands/check_redis.py.
2016-09-12 08:10:50 -07:00
Umair Khan
6c21d7a2c8
Annotate tools/setup/emoji_dump/emoji_dump.py.
2016-09-12 08:10:49 -07:00
Umair Khan
3f7f79f4b5
Annotate confirmation/models.py.
2016-09-12 08:10:48 -07:00
Umair Khan
e2f29054a4
Check type before sending confirmation email.
...
We can only send confirmation email with PreregistrationUser and
Confirmation objects.
2016-09-12 11:00:15 +05:00
Steve Howell
64cb5d0778
Annotate commands/export.py.
2016-09-11 17:15:35 -07:00
Steve Howell
52c6efa0a8
Annotate commands/export_single_user.py.
2016-09-11 17:15:35 -07:00
Steve Howell
bb6fcaa4e7
Annotate commands/export_usermessage_batch.py.
2016-09-11 17:15:35 -07:00
Steve Howell
85e30a6d35
Annotate commands/import.py.
2016-09-11 17:15:35 -07:00
Steve Howell
43572486b2
Annotate test_export.read_file().
2016-09-11 17:15:35 -07:00
Steve Howell
30129f609b
Annotate client_post() and client_get() in test_helpers.
2016-09-11 17:15:35 -07:00
Tomasz Kolek
8b9e9a386a
Add mypy annotations to various integrations-related functions.
...
Added to:
zerver/lib/integrations.py
zerver/tests/test_integrations.py
zerver/tests/test_management_commands.py
zerver/views/integrations.py
zerver/views/webhooks/circleci.py
2016-09-11 17:11:25 -07:00
Umair Khan
d171e2c8d9
Remove race conditions in casper tests.
...
Chaining together `wait*` functions can create race conditions in the
frontend tests. To avoid race condition, we need to insert `then`
function between two `wait*` functions.
2016-09-11 17:10:15 -07:00
Tim Abbott
8fbbb3a471
Annotate send_password_reset_email.py.
2016-09-11 17:09:27 -07:00
Tim Abbott
06580ca76e
Annotate confirmation/util.py.
2016-09-11 17:09:27 -07:00
Tim Abbott
54820de522
Annotate bots/summarize_stream.py.
2016-09-11 17:09:27 -07:00
Steve Howell
98ac51d07d
Clean up imports in html_branches.py.
2016-09-11 15:30:10 -07:00
Steve Howell
071c957f14
tools: Simplify html_tag_tree().
...
Because of some recent changes to the tokenizer, we no longer
need to call is_special_html_tag() to filter out special tags.
I also tried to make the start/end logic for pushing/popping
the stack more obvious.
2016-09-11 13:36:55 -07:00
Gordon P. Hemsley
331617efab
Factor out HtmlTreeBranch and related code from template parser.
...
This code is not directly related to the template parser, so it
can safely live in its own file.
The only significant change to the code is to the signature of
`html_branches` so that it can be called without requiring a file.
Since it's only used in html_grep, that has been updated to reflect
this change.
Fixes : #1774 .
2016-09-11 14:57:17 -04:00
Gordon P. Hemsley
4d3350bd7b
Improve branch test coverage for html_tag_tree() in template parser.
2016-09-11 09:59:13 -07:00
Gordon P. Hemsley
87b87621fe
Reach 100% branch coverage for CSS parser.
2016-09-11 09:59:13 -07:00
Gordon P. Hemsley
911634d1d4
Analyze branch coverage in test-tools.
2016-09-11 09:59:13 -07:00
Tim Abbott
4f091fd844
Annotate irc-mirror.py.
2016-09-10 12:20:24 -07:00
Tim Abbott
4634aa638e
Annotate zerver/lib/tornado_ioloop_logging.py.
2016-09-10 12:10:41 -07:00
Tim Abbott
799c78fbcf
Annotate zerver/lib/sqlalchemy_utils.py.
2016-09-10 12:08:37 -07:00
Tim Abbott
2e6aad669c
cache: Add a basic annotation for cache_with_key.
2016-09-10 11:57:08 -07:00
Tim Abbott
de3fe38e8a
Annotate bots/zulip_git_config.py.
2016-09-10 11:57:08 -07:00
Tim Abbott
83ef7e72e6
models: Fix missing mypy annotations in subdomains code.
2016-09-10 11:57:07 -07:00
Tim Abbott
3a64074e8b
test_signup: Annotate some recently added functions.
2016-09-10 11:57:07 -07:00
Tim Abbott
d32e691fe9
Annotate check-mirroring.
2016-09-10 11:57:01 -07:00
Tim Abbott
317e2a63b3
Remove tools/deprecated/review and associated files.
...
This hasn't been used since before Zulip was open source, and isn't
super reusable, so we can remove it. It'll always be there in the
history if someone ends up wanting it.
While we're at it, we remove the GitPython dependency (only used for
this tool) and the example MSMTP config for the review tool.
2016-09-10 10:53:02 -07:00
Tim Abbott
e48cdb8d7e
Fix python 3 compatibility in logging code.
...
Detected by mypy.
2016-09-09 15:36:29 -07:00