Clean up reviewboard.hostingsvcs.service

Review Request #8908 — Created April 19, 2017 and discarded

Review Board

This patch is mostly a documentation cleanup for the
hostingsvcs.service module. All docstrings in the module are brought
into line with our conventions.

In addition, some internal API changes have been made:

  • The HostingServiceClient._build_request method 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
    into the URLRequest class. The external API for adding HTTP basic
    auth remains unchanged.
  • All default values that were mutable have been replaced with None.
    These methods now all check for None and generate the appropriate
    default value.
  • The HostingServiceClient._build_form_data has 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_data now 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.
  • 0
  • 0
  • 1
  • 0
  • 1
Description From Last Updated
  2. This really should be several small changes instead of one big one. It's pretty hard to review as-is.

    1. see: /r/8909/ /r/8910/ /r/8911/ /r/8912/

Review request changed

Status: Discarded

Change Summary:

This patch has been refactored into:

  • /r/8909/
  • /r/8910/
  • /r/8911/
  • /r/8912/