Skip to content

Commit

Permalink
Renaming http argument(s) as _http. (#3235)
Browse files Browse the repository at this point in the history
  • Loading branch information
dhermes authored and lukesneeringer committed Mar 30, 2017
1 parent 38a0966 commit 8dfd326
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -36,24 +36,26 @@ class Client(BaseClient):
:type credentials: :class:`~google.auth.credentials.Credentials`
:param credentials: (Optional) The OAuth2 Credentials to use for this
client. If not passed (and if no ``http`` object is
client. If not passed (and if no ``_http`` object is
passed), falls back to the default inferred from the
environment.
:type http: :class:`~httplib2.Http`
:param http: (Optional) HTTP object to make requests. Can be any object
that defines ``request()`` with the same interface as
:meth:`~httplib2.Http.request`. If not passed, an
``http`` object is created that is bound to the
``credentials`` for the current object.
:type _http: :class:`~httplib2.Http`
:param _http: (Optional) HTTP object to make requests. Can be any object
that defines ``request()`` with the same interface as
:meth:`~httplib2.Http.request`. If not passed, an
``_http`` object is created that is bound to the
``credentials`` for the current object.
This parameter should be considered private, and could
change in the future.
"""

SCOPE = ('https://www.googleapis.com/auth/cloud-platform',)
"""The scopes required for authenticating as a Resouce Manager consumer."""

def __init__(self, credentials=None, http=None):
def __init__(self, credentials=None, _http=None):
super(Client, self).__init__(
credentials=credentials, http=http)
credentials=credentials, _http=_http)
self._connection = Connection(self)

def new_project(self, project_id, name=None, labels=None):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ def test_constructor(self):

http = object()
credentials = _make_credentials()
client = self._make_one(credentials=credentials, http=http)
client = self._make_one(credentials=credentials, _http=http)
self.assertIsInstance(client._connection, Connection)
self.assertIs(client._credentials, credentials)
self.assertIs(client._http_internal, http)
Expand Down

0 comments on commit 8dfd326

Please sign in to comment.