Improve support for fine-grained text types in the API.
Review Request #6458 — Created Oct. 17, 2014 and submitted
This updates the various resources to support fine-grained setting of
text types per-field, to list the text types, and to optionally return
the raw values along with the forced values (if usingforce-text-type=
andinclude-raw-text-fields=
).Support for setting
text_type=
is still allowed on the resources that
have split this field out. It will act as if individual*_text_type=
values were passed. However, the returnedtext_type
value in the payload
is now hard-coded to null.New
text.per_field_text_types
andtext.can_include_raw_values
capabilities have been added.This is part of a set of changes to allow for per-field optional for
Markdown. It requires the other set of changes.
Unit tests pass.
Tested all the new support through the UI, using upcoming changes.
Description | From | Last Updated |
---|---|---|
Col: 16 E127 continuation line over-indented for visual indent |
reviewbot | |
local variable 'old_rich_text' is assigned to but never used |
reviewbot | |
redefinition of unused 'test_post_with_text_type_markdown' from line 9 |
reviewbot | |
redefinition of unused 'test_post_with_body_top_text_type_markdown' from line 27 |
reviewbot | |
redefinition of unused 'test_post_with_body_bottom_text_type_markdown' from line 45 |
reviewbot | |
redefinition of unused 'test_put_with_text_type_markdown' from line 162 |
reviewbot | |
redefinition of unused 'test_put_with_body_top_text_type_markdown' from line 180 |
reviewbot | |
redefinition of unused 'test_put_with_body_bottom_text_type_markdown' from line 198 |
reviewbot | |
Shouldn't this be treated as an error? |
david | |
This loop is now pretty comical. Can you flatten it out? |
david | |
Would it make sense to raise NotImplementedError? |
david | |
Would it make sense to raise NotImplementedError? |
david | |
Same here. |
david | |
And here? |
david | |
And here? |
david | |
This should use "text type" instead of "text mode" |
david | |
This should use "text type" instead of "text mode" |
david | |
You could put the ( on the first line. |
david | |
Shouldn't this be passing in close_description_rich_text? |
david | |
I'm going to stop marking these, but if you decide on using NotImplementedError, can you do it throughout? |
david |
- Change Summary:
-
Fixed Review Bot complaints.
- Commit:
-
07d2caf48e35269aa92eb896fd5e1e91510bb32600832d0c92857258c095d0e6676c0218c2f88298
- Diff:
-
Revision 2 (+708 -598)
-
Tool: Pyflakes Processed Files: reviewboard/webapi/resources/base_comment.py reviewboard/webapi/tests/test_review.py reviewboard/webapi/server_info.py reviewboard/webapi/tests/test_review_reply.py reviewboard/webapi/resources/review_request_draft.py reviewboard/webapi/resources/review_request.py reviewboard/reviews/models/review_request.py reviewboard/webapi/tests/mixins_review.py reviewboard/webapi/resources/base_review.py reviewboard/webapi/mixins.py reviewboard/webapi/tests/test_review_request_draft.py reviewboard/webapi/resources/review_reply.py Tool: PEP8 Style Checker Processed Files: reviewboard/webapi/resources/base_comment.py reviewboard/webapi/tests/test_review.py reviewboard/webapi/server_info.py reviewboard/webapi/tests/test_review_reply.py reviewboard/webapi/resources/review_request_draft.py reviewboard/webapi/resources/review_request.py reviewboard/reviews/models/review_request.py reviewboard/webapi/tests/mixins_review.py reviewboard/webapi/resources/base_review.py reviewboard/webapi/mixins.py reviewboard/webapi/tests/test_review_request_draft.py reviewboard/webapi/resources/review_reply.py
- Change Summary:
-
- Fixed some wording in doc strings.
- Simplified the handling of ship_it in base_review.py.
- Passed the correct value for close_description_rich_text.
- Cleaned up a line continuation.
- Commit:
-
00832d0c92857258c095d0e6676c0218c2f88298db90d785ab06c7eca6d586a76c5e8cdd6241d96d
- Diff:
-
Revision 3 (+709 -602)
-
Tool: Pyflakes Processed Files: reviewboard/webapi/resources/base_comment.py reviewboard/webapi/tests/test_review.py reviewboard/webapi/server_info.py reviewboard/webapi/tests/test_review_reply.py reviewboard/webapi/resources/review_request_draft.py reviewboard/webapi/resources/review_request.py reviewboard/reviews/models/review_request.py reviewboard/webapi/tests/mixins_review.py reviewboard/webapi/resources/base_review.py reviewboard/webapi/mixins.py reviewboard/webapi/tests/test_review_request_draft.py reviewboard/webapi/resources/review_reply.py Tool: PEP8 Style Checker Processed Files: reviewboard/webapi/resources/base_comment.py reviewboard/webapi/tests/test_review.py reviewboard/webapi/server_info.py reviewboard/webapi/tests/test_review_reply.py reviewboard/webapi/resources/review_request_draft.py reviewboard/webapi/resources/review_request.py reviewboard/reviews/models/review_request.py reviewboard/webapi/tests/mixins_review.py reviewboard/webapi/resources/base_review.py reviewboard/webapi/mixins.py reviewboard/webapi/tests/test_review_request_draft.py reviewboard/webapi/resources/review_reply.py