Anders Kaseorg
aaa7b766d8
python: Use universal_newlines to get str from subprocess.
...
We can replace ‘universal_newlines’ with ‘text’ when we bump our
minimum Python version to 3.7.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2020-10-30 11:36:38 -07:00
Anders Kaseorg
31d0141a30
python: Close opened files.
...
Fixes various instances of ‘ResourceWarning: unclosed file’ with
python -Wd.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2020-10-26 12:31:30 -07:00
Anders Kaseorg
72d6ff3c3b
docs: Fix more capitalization issues.
...
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2020-10-23 11:46:55 -07:00
Harsh Srivastava
ba36624442
api docs: Removing order dependency of deactivate user test.
...
We create a User using `do_create_user`, before running the
deactivation test. This lets us removing the ordering logic
introduced in 7c17bdb9c5
.
2020-09-14 22:31:40 -07:00
Tim Abbott
f751acbec5
openapi: Add comments on top of various OpenAPI doc files.
...
This is part of our standard approach for trying to make it easy for
folks to find relevant documentation on a system they're trying to
understand.
2020-09-14 15:25:46 -07:00
Anders Kaseorg
7c17bdb9c5
openapi: Remove ‘example’ $ref siblings.
...
$ref siblings are ignored according to the OpenAPI specification, and
the referenced definitions already have examples.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2020-09-12 11:57:13 -07:00
Anders Kaseorg
768f9f93cd
docs: Capitalize Markdown consistently.
...
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2020-08-11 10:23:06 -07:00
Anders Kaseorg
365fe0b3d5
python: Sort imports with isort.
...
Fixes #2665 .
Regenerated by tabbott with `lint --fix` after a rebase and change in
parameters.
Note from tabbott: In a few cases, this converts technical debt in the
form of unsorted imports into different technical debt in the form of
our largest files having very long, ugly import sequences at the
start. I expect this change will increase pressure for us to split
those files, which isn't a bad thing.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2020-06-11 16:45:32 -07:00
Anders Kaseorg
67e7a3631d
python: Convert percent formatting to Python 3.6 f-strings.
...
Generated by pyupgrade --py36-plus.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2020-06-10 15:02:09 -07:00
Anders Kaseorg
8dd83228e7
python: Convert "".format to Python 3.6 f-strings.
...
Generated by pyupgrade --py36-plus --keep-percent-format, but with the
NamedTuple changes reverted (see commit
ba7906a3c6
, #15132 ).
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2020-06-08 15:31:20 -07:00
orientor
3ffc9466c9
openapi: Combine two similar openapi markdown extensions.
...
Previously api_description and api_code_examples were two independent
markdown extensions for displaying OpenAPI content used in the same
places. We combine them into a single markdown extension (with two
processors) and move them to the openapi folder to make the codebase
more readable and better group the openapi code in the same place.
2020-05-05 21:42:31 -07:00
Steve Howell
105c168b19
test-api: Avoid flakes with curl tests.
2020-04-21 11:30:29 -04:00
Anders Kaseorg
c734bbd95d
python: Modernize legacy Python 2 syntax with pyupgrade.
...
Generated by `pyupgrade --py3-plus --keep-percent-format` on all our
Python code except `zthumbor` and `zulip-ec2-configure-interfaces`,
followed by manual indentation fixes.
Signed-off-by: Anders Kaseorg <anders@zulipchat.com>
2020-04-09 16:43:22 -07:00
Vishnu Ks
08103544cc
tests: Remove upload-file from curl test exclude_list.
2019-11-18 12:23:38 -08:00
Vishnu Ks
76c610c953
tests: Remove upload-custom-emoji from curl test exclude_list.
2019-11-18 12:23:38 -08:00
Vishnu Ks
742de73bde
tests: Remove update-notification-settings from curl test exclude_list.
2019-11-18 12:23:38 -08:00
Vishnu Ks
c4525cceee
tests: Remove get-user-groups from curl test exclude_list.
2019-11-18 12:23:38 -08:00
Vishnu Ks
3468764415
tests: Remove remove-linkifiers from curl test exclude_list.
2019-11-18 12:23:38 -08:00
Vishnu Ks
258089bdc3
tests: Remove add-linkifiers from curl test exclude_list.
2019-11-18 12:23:38 -08:00
Vishnu Ks
ec53b8c574
tests: Unescape the html generated in curl example test.
...
Curl examples generated in test_generated_curl_examples_for_success
used to be html escaped. This commit removes the escaping in the test
since curl examples are not html escaped when run from terminal.
2019-11-18 12:23:38 -08:00
Vishnu Ks
a478e861a2
tests: Remove create-user from curl test exclude_list.
...
The API test client uses an admin client since
0f64fe530667fd3b96a434842b124075dea84300
2019-11-18 12:23:38 -08:00
Vishnu Ks
0632d26e5e
tests: Remove update-stream from curl test exclude_list.
2019-11-15 15:53:31 -08:00
Vishnu Ks
be49dd4f30
tests: Remove delete-user-group from curl test exclude_list.
2019-11-15 15:53:31 -08:00
Vishnu KS
ee2d20ff3c
tests: Remove update-user-group from curl test exclude_list.
2019-11-15 15:53:31 -08:00
Vishnu Ks
4b212efba6
tests: Remove create-user-group from curl test exclude_list.
2019-11-15 15:53:31 -08:00
Vishnu Ks
473d178fbc
tests: Remove delete-stream from curl test exclude_list.
2019-11-15 15:53:31 -08:00
Vishnu Ks
4e15dabcfa
tests: Remove remove-subscriptions from curl test exclude_list.
2019-11-15 15:53:31 -08:00
Vishnu KS
3efe35e35b
tests: Remove delete-message from curl test exclude_list.
2019-11-15 15:53:31 -08:00
Anders Kaseorg
40f4ead738
mypy: Upgrade from 0.720 to 0.730.
...
Fixes #13269 .
Signed-off-by: Anders Kaseorg <anders@zulipchat.com>
2019-11-13 12:38:45 -08:00
Vishnu Ks
2f5f23ecc6
tests: Remove get-presence from curl test exclude_list.
2019-10-30 16:49:27 -07:00
Vishnu Ks
7aabbe2f35
tests: Remove delete-queue from curl test exclude_list.
2019-10-30 16:49:27 -07:00
Vishnu Ks
a99b96d9db
tests: Remove get-events-from-queue from curl test exclude_list.
2019-10-30 16:49:27 -07:00
Vishnu Ks
4aae633d59
tests: Remove get-stream-topics from curl test exclude_list.
2019-10-30 16:49:27 -07:00
Vishnu Ks
db294072be
tests: Remove update-subscription-data from curl test exclude_list.
2019-10-30 16:49:27 -07:00
Vishnu Ks
eb567abcec
tests: Remove mark-as-read-bulk from curl test exclude_list.
2019-10-30 16:49:27 -07:00
Vishnu KS
39f7d250bd
tests: Remove update-message-flags from curl test exclude_list.
2019-10-30 16:49:27 -07:00
Vishnu KS
31a50753f3
tests: Remove get-message-history from curl test exclude_list.
2019-10-30 16:49:27 -07:00
Vishnu KS
93c003d2aa
tests: Remove update-message from curl test exclude_list.
2019-10-30 16:49:27 -07:00
Vishnu KS
8e9ccdf376
tests: Remove get-raw-message from curl test exclude_list.
2019-10-30 16:49:26 -07:00
Vishnu Ks
37c5f9b9c5
tests: Move add-linkifiers to correct position in exclude list.
2019-10-21 15:30:57 -07:00
Vishnu KS
f2242c1487
docs: Make update-notification-settings use curl example system.
2019-10-21 17:10:35 +05:30
Vishnu KS
0af7aa8db3
docs: Make update-stream use curl example system.
...
new_name and description params should be valid JSON
strings. The format of these params are marked as
json so that the curl example genenrator can convert
them into json strings.
2019-10-18 13:45:30 -07:00
Vishnu Ks
e96d96b6e4
docs: Add curl example to upload-file.
2019-10-18 13:45:30 -07:00
Vishnu Ks
9ac77a8734
docs: Make upload-custom-emoji use curl example system.
2019-10-18 13:45:30 -07:00
Vishnu Ks
1a0a282242
docs: Make delete-queue use curl example system.
2019-10-15 15:53:03 -07:00
Vishnu Ks
f7add25cc2
docs: Make get-events-from-queue use curl example system.
2019-10-15 15:53:03 -07:00
Vishnu Ks
0b297fc092
docs: Make remove-linkifiers use curl example system.
2019-10-15 15:53:03 -07:00
Vishnu Ks
6a5fdcabbd
docs: Make delete-user-group use curl example system.
2019-10-15 15:53:03 -07:00
Vishnu Ks
d1540f7e10
docs: Make update-user-group use curl example system.
2019-10-15 15:53:03 -07:00
Vishnu Ks
c5d6be4df7
docs: Make create-user-group use curl example system.
2019-10-15 15:53:03 -07:00