rht
8990b1046d
zerver: Remove inheritance from object.
2017-11-06 08:53:48 -08:00
rht
2ceb0b45b3
zerver/tornado: Remove inheritance from object.
2017-11-06 08:53:48 -08:00
rht
c7fa1d4146
zerver/tests: Remove inheritance from object.
2017-11-06 08:53:48 -08:00
rht
864e16f30d
zerver/migrations: Remove inheritance from object.
2017-11-06 08:53:48 -08:00
rht
e311842a1b
zerver/lib: Remove inheritance from object.
2017-11-06 08:53:48 -08:00
rht
0e71b243ce
zilencer: Remove inheritance from object.
2017-11-06 08:53:48 -08:00
rht
e33c8d91e0
zproject: Remove inheritance from object.
2017-11-06 08:53:48 -08:00
rht
5cfffb0e51
analytics: Remove inheritance from object.
2017-11-06 08:53:48 -08:00
Cynthia Lin
7a6e0dda41
static: Optimize SVG images.
2017-11-04 20:57:19 -07:00
Cynthia Lin
d94a84e77f
static: Remove unused images.
2017-11-04 20:57:19 -07:00
neiljp (Neil Pilgrim)
42f5eea61f
mypy: Improve typing of request.pyi (REQ).
...
This expands request.pyi to type-check the arguments passed into REQ.
Tweaked by tabbott to fix the report.py annotations.
2017-11-04 20:26:03 -07:00
rht
dd1920c811
confirmation: Use python 3 syntax for typing.
2017-11-04 19:59:41 -07:00
rht
ada9979f51
docs: Use python 3 syntax for typing.
2017-11-04 19:58:05 -07:00
rht
26b6b893e6
zproject: Use python 3 syntax for typing.
2017-11-04 19:58:03 -07:00
rht
77f32a1e0c
frontend_tests: Use python 3 syntax for typing.
2017-11-04 19:57:55 -07:00
neiljp (Neil Pilgrim)
0d31cb568c
mypy: Broaden some types from Dict to Any based on context.
2017-11-04 19:47:45 -07:00
neiljp (Neil Pilgrim)
055dff9038
mypy: Clarify parameter types in test_decorators.py.
2017-11-04 19:47:45 -07:00
neiljp (Neil Pilgrim)
6e6b1ce0d5
mypy: Explicitly inherit test_[sequence|mapping] test classes from generic types.
2017-11-04 19:47:45 -07:00
neiljp (Neil Pilgrim)
3fd720d8f4
mypy: Broadly specify lambda type parameters in test_events.py.
2017-11-04 19:47:45 -07:00
neiljp (Neil Pilgrim)
aae8a03415
mypy: Explicitly specify Dict[str, Any] as DummyForm base type.
2017-11-04 19:47:45 -07:00
neiljp (Neil Pilgrim)
2a2870eec8
mypy: Fully specify type of Callable parameter to process_instrumented_calls.
2017-11-04 19:47:45 -07:00
neiljp (Neil Pilgrim)
b0e9fd7fa0
mypy: Specify type of decorator correctly in test_logging_handlers.py.
2017-11-04 19:47:45 -07:00
neiljp (Neil Pilgrim)
f3b5b9db78
mypy: Specify Callable parameters in FakeClient functions in WorkerTest.
2017-11-04 19:47:45 -07:00
neiljp (Neil Pilgrim)
6f490394c3
mypy: Set explicit Any-like parameters for StatsMock functions.
2017-11-04 19:47:45 -07:00
neiljp (Neil Pilgrim)
692e2150c6
mypy: Explicitly specify List[Any] in test_classes.py.
2017-11-04 19:47:45 -07:00
neiljp (Neil Pilgrim)
792a580efb
mypy: Specify Callable type parameters in test_helpers.py.
2017-11-04 19:47:45 -07:00
neiljp (Neil Pilgrim)
952f034136
mypy: Set explicit Any-like parameters for handle_callback_exception in runtornado.py.
2017-11-04 19:47:45 -07:00
neiljp (Neil Pilgrim)
186181c2a0
mypy: Specify type parameters in convert_term in narrow_parameter.
2017-11-04 19:47:45 -07:00
neiljp (Neil Pilgrim)
da97de3370
mypy: Use Dict[Any,Any] for update_realm parameter.
2017-11-04 19:47:45 -07:00
neiljp (Neil Pilgrim)
720df640e7
mypy: Set freshdesk TicketDict to inherit from typed Dict.
2017-11-04 19:47:45 -07:00
neiljp (Neil Pilgrim)
6c995db231
mypy: Use Iterator[Any] as return type of queryset_iterator.
2017-11-04 19:47:45 -07:00
neiljp (Neil Pilgrim)
1197ff9655
mypy: Explicitly return Set[Any] for empty set in backends.py.
2017-11-04 19:47:45 -07:00
neiljp (Neil Pilgrim)
54cbb808e6
mypy: Add explicit Any parameters to get_user_events return type.
2017-11-04 19:47:44 -07:00
neiljp (Neil Pilgrim)
fed757452c
mypy: Clarify type of lookup_dict in aggregate_message_dict.
2017-11-04 19:47:44 -07:00
neiljp (Neil Pilgrim)
b693f32c0b
mypy: Add Dict parameters for dropbox_image return type.
...
Also a note re using TypedDict in future, as the Dict looks constrained.
2017-11-04 19:47:44 -07:00
neiljp (Neil Pilgrim)
737408f741
mypy: Add explicit flexible type parameters for Callable in run-dev.py.
2017-11-04 19:47:44 -07:00
neiljp (Neil Pilgrim)
9f90a3174b
mypy: Add explicit Any as Dict parameters in check_line_coverage in test-js-with-node.
2017-11-04 19:47:44 -07:00
neiljp (Neil Pilgrim)
221be326a9
mypy: Set type parameters for IO to Any in scripts/lib/node_cache.py.
2017-11-04 19:47:44 -07:00
neiljp (Neil Pilgrim)
abc0d5e79b
mypy: Add type parameter for Set in check_help_documentation.py.
2017-11-04 19:47:44 -07:00
neiljp (Neil Pilgrim)
a5d1fdf0d6
mypy: Add type parameter for IO in test-queue-worker-reload.
2017-11-04 19:47:44 -07:00
neiljp (Neil Pilgrim)
458ab3020d
mypy: Add explicit Any for generic types in type_debug.py.
2017-11-04 19:47:44 -07:00
Tim Abbott
ff2f55e8ba
docs: Add some basic coverage of our mypy Python 3 situation.
2017-11-04 19:46:32 -07:00
Tim Abbott
671c3dea66
mypy: Fix type annotation style in webhook walkthrough.
2017-11-04 19:44:12 -07:00
rht
969cc506d2
zerver/webhooks: Use python 3 syntax for typing.
...
Tweaked by tabbott to fix various line-wrapping issues.
2017-11-04 19:40:32 -07:00
Greg Price
68b0a419ec
decorator: Cut a bunch of dead imports of two view decorators.
...
Saw these when grepping for these two decorators; they're actually
more numerous than the surviving use sites are. Cut out the noise.
2017-11-04 19:27:00 -07:00
Greg Price
6b9d294873
auth: Set user_activity `query` nicely for several auth views.
...
This gets used when we call `process_client`, which we generally do at
some kind of login; and in particular, we do in the shared auth
codepath `login_or_register_remote_user`. Add a decorator to make it
easy, and use it on the various views that wind up there.
In particular, this ensures that the `query` is some reasonable
constant corresponding to the view, as intended. When not set, we
fall back in `update_user_activity` on the URL path, but in particular
for `log_into_subdomain` that can now contain a bunch of
request-specific data, which makes it (a) not aggregate properly, and
(b) not even fit in the `CHARACTER VARYING(50)` database field we've
allotted it.
2017-11-04 19:27:00 -07:00
Greg Price
b2d35872ed
decorator: Set the user_activity query in another case.
...
Now that this is a little less mysterious-looking to do,
let's do it in this spot too.
2017-11-04 19:27:00 -07:00
Greg Price
1a540241a9
require_server_admin: Cut a redundant bit of request-mutation.
...
The only place this attribute is used is in `update_user_activity`,
called only in `process_client`, which won't happen if we end up
returning a redirect just below. If we don't, we go and call
`add_logging_data` just after, which takes care of this already.
2017-11-04 19:27:00 -07:00
Greg Price
b871aa9622
user_activity: Allow passing the `query` more directly.
...
This won't work for all call paths without deeper refactoring,
but for at least some paths we can make this more direct -- function
arguments, rather than mutating a request attribute -- so it's easier
to see how the data is flowing.
2017-11-04 19:27:00 -07:00
Tim Abbott
732a5bae84
analytics: Fix checks for pointer update route.
2017-11-04 19:27:00 -07:00