Max
c8dc033c3c
Annotate camo.py, mandrill_client.py, query.py, session_user.py
2016-06-04 11:28:42 -07:00
David Adamec
9e8ea93d3d
Add annotations for zerver/lib/validator.
2016-06-03 23:53:49 -07:00
David Adamec
4f3c85a20c
Add type annotations to zerver/lib/rest.
2016-06-03 23:48:46 -07:00
Conrad Dean
e7f0698884
Annotate zerver/lib/notifications.py.
2016-06-03 23:45:29 -07:00
Tim Abbott
7fd2956f29
clear_followup_emails_queue: Rename confusing local variable.
2016-06-03 23:45:29 -07:00
medullaskyline
cb84f72f2d
Annotate zerver/lib/html_diff.py.
2016-06-03 23:21:26 -07:00
Tim Abbott
e89730dc8f
subject_links: Remove useless RealmFilter.DoesNotExist case.
2016-06-03 23:18:39 -07:00
David Adamec
8ad20e9775
mypy type annotations for zerver/lib/utils
2016-06-03 22:58:15 -07:00
Tim Abbott
1552b9308b
Fix apnsclient import to match version 0.1.8 used in production.
...
Apparently, apnsclient moved Connection to a different module between
0.1.8 and 0.2.1.
2016-06-03 19:28:36 -07:00
Max
0f4673ae3b
Add type annotation to mention.py, redis_utils.py, timestamp.py, user_agent.py
...
Some functions in models.py had input typed as int when they needed to be typed as datetime.datetime
2016-06-03 19:00:16 -07:00
Tim Abbott
654bd663aa
bugdown: Add annotations for a few more functions.
...
This resolves the issue with Typeshed #244 by making `upload_re` start
with `ur`.
2016-06-03 18:11:53 -07:00
Tim Abbott
f97b025a33
push_notifications: Fix incorrect Connection import.
2016-06-03 18:11:53 -07:00
medullaskyline
303bd21068
Annotate zserver.lib.push_notifications.
2016-06-03 17:45:54 -07:00
Oren Leaffer
2916fb30cb
bugdown: add some type annotations.
...
Had to add some "type: ignore" because the pattern used in match
doesn't affect the type returned. A fix for this issue has been pushed
to typeshed - https://github.com/python/typeshed/pull/244
2016-06-03 17:03:52 -07:00
medullaskyline
2213a9f41f
Annotate zerver/lib/cache_helpers.py
2016-06-03 16:34:30 -07:00
Conrad Dean
7f61a5e862
Add type annotations to zerver.lib.test_helpers.
2016-06-03 12:17:26 -07:00
Nathan Florea
04c71fadc6
More removal of mutable default arguments.
...
I've left a few that clearly aren't being passed and aren't being mutated, but
I think I've gotten the rest of them.
2016-06-03 09:17:04 -07:00
Nathan Florea
5fe9076631
Remove some mutable default arguments.
...
These ones don't fix any bugs, because the mutable arg is never passed
outside of the callable or mutated. But it's good practice to not use
them in case those invariants are changed in the future.
2016-06-03 09:16:56 -07:00
Ashish Kumar
31bf6b8259
Type annotation of zerver/models.py
...
[Substantially revised by tabbott]
This probably still has some bugs in it, but having mostly complete
annotations for models.py will help a lot for the annotations folks
are adding to other files.
2016-06-02 23:28:34 -07:00
Ashish Kumar
cad342aff6
Correct annotation of generic_bulk_cached_fetch in zerver/lib/cache.py.
...
Previously, object_ids was tagged as an int, but it is called from
models.py with a string, so we make it an Any.
2016-06-01 14:00:49 -07:00
Umair Khan
08fbd57245
[i18n] Make error messages translatable.
...
Make all strings passing through `json_error` and `JsonableError`
translatable.
Fixes #727
2016-05-31 07:40:42 -07:00
Tim Abbott
960144a49e
Desupport using uninstantiated REQ with has_request_variables.
...
This makes life difficult for doing static type annotations, and
didn't make the code look that much better anyway.
2016-05-31 07:31:15 -07:00
Tim Abbott
41336f3782
lint-all: Check for use of '== None'.
2016-05-31 07:02:04 -07:00
Umair Khan
c884559ec6
Show templates rendered report.
...
Add two options to the `test-backend` script:
1. verbose
If given the `test-backend` script will give detailed output.
2. no-shallow
Default value is False. If given the `test-backend` script will
fail if it finds a template which is shallow tested.
2016-05-31 16:46:11 +05:00
Tomasz Kolek
8e144a1f57
Add zip and absoulte_import to pass py3k test.
2016-05-30 22:28:05 +02:00
Reid Barton
8c6afac7cd
Add a stub file for request.py.
...
This stub file allows us to annotate view functions using the actual
types present in the bodies of the functions, rather than everything
having the type REQ.
2016-05-30 11:28:53 -07:00
Tim Abbott
572c69f3c2
Move REQ and friends to their own module.
2016-05-30 11:24:17 -07:00
Eklavya Sharma
48e7e1a2a1
zerver/lib/actions.py: Rename stream_name to stream.
...
In function bulk_add_subscriptions, some variables were named
`stream_name` but their type is Stream, not a string. Rename
those variables to `stream`.
2016-05-30 09:52:59 -07:00
Eklavya Sharma
94e4b39112
Replace python2.7 by python everywhere.
2016-05-29 05:03:08 -07:00
Eklavya Sharma
149938d468
Change shebangs from python2.7 to python.
2016-05-29 05:03:08 -07:00
Eklavya Sharma
1bb6a0db4c
Annotate zerver/lib/actions.py.
2016-05-29 04:26:17 -07:00
Eklavya Sharma
2308107805
zerver/lib/actions.py: Use unicode literals.
...
Convert some strings literals to unicode strings by prefixing with `u`.
2016-05-29 04:26:17 -07:00
Eklavya Sharma
b74f603682
zerver/lib/actions.py: Rename variables and add/edit comments.
2016-05-29 04:26:17 -07:00
Eklavya Sharma
efab224bd1
zerver/lib/actions.py: Remove unneeded return {} statements.
2016-05-29 04:26:17 -07:00
Eklavya Sharma
a2b48f05e5
zerver/lib/actions.py: Fix return values.
2016-05-29 04:26:17 -07:00
Eklavya Sharma
1ea6171179
Fix an annotation in zerver/lib/cache.py.
...
This is done to make annotations in zerver/lib/actions.py work correctly.
2016-05-25 15:11:48 -07:00
Eklavya Sharma
1c04560def
Re-enable pyflakes in linter and remove python 3 pyflakes errors.
2016-05-25 19:25:13 +05:30
Eklavya Sharma
459c6640bf
Fix type annotations in zerver/lib/alert_words.py.
2016-05-24 14:12:11 -07:00
Eklavya Sharma
95d059bfb3
Fix typo in zerver/lib/actions.py.
2016-05-24 14:12:11 -07:00
Eklavya Sharma
508a080e08
do_change_bot_type: Add update_fields to user_profile.save().
2016-05-24 13:21:44 -07:00
Tomasz Kolek
8c18b8947f
Add bot_type field to UserProfile.
...
This is intended to support creating different types of bots with
potentially limited permissions.
2016-05-19 22:37:37 -07:00
Aristeidis Fkiaras
3ee210d9e8
Add setting to only allow admins create new streams.
...
Fixes : #691 .
Thanks to Preston Hansen for work on this feature!
2016-05-18 18:53:13 -07:00
Tomasz Kolek
c4254497b2
Add WebhookTestCase abstract class for writing webhook tests.
...
This cuts a ton of code duplication and semi-duplication between the
webhook tests, and thus should make it a lot easier to write new ones.
2016-05-18 14:37:31 -07:00
Eklavya Sharma
98afe000ee
Make zerver/lib/statistics.py pass mypy check.
2016-05-18 17:10:18 +05:30
Eklavya Sharma
0dcd8b387d
Make zerver/lib/bugdown/fenced_code.py pass mypy check.
2016-05-18 17:10:17 +05:30
Eklavya Sharma
46757f07bf
Make zerver/lib/actions.py pass mypy check.
2016-05-18 17:10:17 +05:30
Tim Abbott
2409ac9b2f
cache: Add type annotations to active_*_dict_fields.
2016-05-10 11:48:03 -07:00
Tim Abbott
92bec8cfea
Merge Zulip 1.3.12 security release.
2016-05-10 11:32:26 -07:00
Tim Abbott
9b65464b6b
logout_all_users: Add option to logout deactivated users.
2016-05-10 09:50:57 -07:00
Tim Abbott
393159bbd8
queue: Disable RabbitMQ heartbeat in BlockingConnection.
...
Fixes #741 .
2016-05-10 09:50:57 -07:00