Clean up reviewboard.hostingsvcs.service
Review Request #8908 - Created April 19, 2017 and discarded
This patch is mostly a documentation cleanup for the
hostingsvcs.servicemodule. All docstrings in the module are brought
into line with our conventions.
In addition, some internal API changes have been made:
HostingServiceClient._build_requestmethod was only ever used in
one place so it has been removed and its definition been made inline.
- The logic for adding HTTP basic auth headers to a request has moved
URLRequestclass. The external API for adding HTTP basic
auth remains unchanged.
- All default values that were mutable have been replaced with
These methods now all check for
Noneand generate the appropriate
HostingServiceClient._build_form_datahas been made both a
staticmethod (since it should never be looking at instance variables
and public (since it is generally useful outside the class).
HostingServiceClient.build_form_datanow generates a list of strings
to append together, instead of repeatedly performing string addition.
Also, multiline string literals are now used to generate the content
instead of doing string concatenation. Interpolation has been changed
to use dictionaries for clarity.
- Built the docs.
- Ran unit tests.