Skip to content

Commit 2fe8e36

Browse files
authored
Indenting multiline argument and exception details (#15)
1 parent 65e74c7 commit 2fe8e36

File tree

4 files changed

+9
-11
lines changed

4 files changed

+9
-11
lines changed

firebase_admin/__init__.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ def initialize_app(credential=None, options=None, name=_DEFAULT_APP_NAME):
2727
2828
Args:
2929
credential: A credential object used to initialize the SDK (optional). If none is provided,
30-
Google Application Default Credentials are used.
30+
Google Application Default Credentials are used.
3131
options: A dictionary of configuration options (optional).
3232
name: Name of the app (optional).
3333
@@ -36,7 +36,7 @@ def initialize_app(credential=None, options=None, name=_DEFAULT_APP_NAME):
3636
3737
Raises:
3838
ValueError: If the app name is already in use, or any of the
39-
provided arguments are invalid.
39+
provided arguments are invalid.
4040
"""
4141
if credential is None:
4242
credential = credentials.ApplicationDefault()
@@ -100,7 +100,7 @@ def get_app(name=_DEFAULT_APP_NAME):
100100
101101
Raises:
102102
ValueError: If the specified name is not a string, or if the specified
103-
app does not exist.
103+
app does not exist.
104104
"""
105105
if not isinstance(name, six.string_types):
106106
raise ValueError('Illegal app name argument type: "{}". App name '

firebase_admin/auth.py

+4-6
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ def create_custom_token(uid, developer_claims=None, app=None):
6969
Args:
7070
uid: ID of the user for whom the token is created.
7171
developer_claims: A dictionary of claims to be included in the token
72-
(optional).
72+
(optional).
7373
app: An App instance (optional).
7474
7575
Returns:
@@ -97,9 +97,8 @@ def verify_id_token(id_token, app=None):
9797
9898
Raises:
9999
ValueError: If the input parameters are invalid, or if the App was not
100-
initialized with a credentials.Certificate.
101-
AppIdenityError: The JWT was found to be invalid, the message will contain
102-
details.
100+
initialized with a credentials.Certificate.
101+
AppIdenityError: The JWT was found to be invalid, the message will contain details.
103102
"""
104103
token_generator = _get_token_generator(app)
105104
return token_generator.verify_id_token(id_token)
@@ -199,8 +198,7 @@ def verify_id_token(self, id_token):
199198
200199
Raises:
201200
ValueError: The app was not initialized with a credentials.Certificate instance.
202-
AppIdenityError: The JWT was found to be invalid, the message will
203-
contain details.
201+
AppIdenityError: The JWT was found to be invalid, the message will contain details.
204202
"""
205203
if not id_token:
206204
raise ValueError('Illegal ID token provided: {0}. ID token must be a non-empty '

firebase_admin/credentials.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ def __init__(self):
9595
9696
Raises:
9797
oauth2client.client.ApplicationDefaultCredentialsError: If Application Default
98-
credentials cannot be initialized in the current environment.
98+
credentials cannot be initialized in the current environment.
9999
"""
100100
super(ApplicationDefault, self).__init__()
101101
self._g_credential = client.GoogleCredentials.get_application_default()

firebase_admin/jwt.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ def decode(token):
8787
8888
Returns:
8989
tuple: A 2-tuple where the first element is a dictionary of JWT headers,
90-
and the second element is a dictionary of payload claims.
90+
and the second element is a dictionary of payload claims.
9191
9292
Raises:
9393
AppIdentityError: If the token is malformed or badly formatted

0 commit comments

Comments
 (0)