Skip to content

Commit f0d6007

Browse files
authored
Making some style and format fixes. (#117)
1 parent 3ed4004 commit f0d6007

File tree

2 files changed

+14
-14
lines changed

2 files changed

+14
-14
lines changed

src/firebase_functions/core.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
@_dataclass.dataclass(frozen=True)
2525
class CloudEvent(_typing.Generic[T]):
2626
"""
27-
A Cloud Event is the base of a cross-platform format for encoding a serverless event.
27+
A CloudEvent is the base of a cross-platform format for encoding a serverless event.
2828
More information can be found at https://github.com/cloudevents/spec
2929
"""
3030

@@ -60,15 +60,15 @@ class CloudEvent(_typing.Generic[T]):
6060

6161
subject: str | None
6262
"""
63-
The resource, provided by source, that this event relates to
63+
The resource, provided by source, that this event relates to.
6464
"""
6565

6666

6767
@_dataclass.dataclass(frozen=True)
6868
class Change(_typing.Generic[T]):
6969
"""
70-
* The Functions interface for events that change state, such as
71-
* Realtime Database `on_value_written`.
70+
The Cloud Functions interface for events that change state, such as
71+
Realtime Database `on_value_written`.
7272
"""
7373

7474
before: T

src/firebase_functions/https_fn.py

+10-10
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
14-
"""Module for Cloud Functions that listen to HTTPS endpoints.
14+
"""Module for functions that listen to HTTPS endpoints.
1515
These can be raw web requests and Callable RPCs.
1616
"""
1717
# pylint: disable=protected-access
@@ -32,7 +32,7 @@
3232

3333
class FunctionsErrorCode(str, _enum.Enum):
3434
"""
35-
The set of Firebase Functions status codes. The codes are the same at the
35+
The set of Cloud Functions status codes. The codes are the same as the
3636
ones exposed by gRPC here:
3737
https://github.com/grpc/grpc/blob/master/doc/statuscodes.md
3838
"""
@@ -54,7 +54,7 @@ class FunctionsErrorCode(str, _enum.Enum):
5454
Client specified an invalid argument. Note that this
5555
differs from `failed-precondition`. `invalid-argument` indicates
5656
arguments that are problematic regardless of the state of the system
57-
(e.g. an invalid field name).
57+
(such as an invalid field name).
5858
"""
5959

6060
DEADLINE_EXCEEDED = "deadline-exceeded"
@@ -120,7 +120,7 @@ class FunctionsErrorCode(str, _enum.Enum):
120120
INTERNAL = "internal"
121121
"""
122122
Internal errors. Means some invariants expected by
123-
underlying system has been broken. If you see one of these errors,
123+
underlying system have been broken. If you see one of these errors,
124124
something is very broken.
125125
"""
126126

@@ -208,7 +208,7 @@ class _HttpErrorCode:
208208
"""
209209
Standard error codes and HTTP statuses for different ways a request can fail,
210210
as defined by:
211-
https://github.com/googleapis/googleapis/blob/master/google/rpc/code.proto
211+
https://github.com/googleapis/googleapis/blob/master/google/rpc/code.proto.
212212
This map is used primarily to convert from a client error code string to
213213
to the HTTP format error code string and status, and make sure it's in the
214214
supported set.
@@ -282,12 +282,12 @@ class AuthData:
282282

283283
uid: str
284284
"""
285-
User ID of the Id token.
285+
User ID of the ID token.
286286
"""
287287

288288
token: dict[str, _typing.Any]
289289
"""
290-
The Id token's decoded claims.
290+
The ID token's decoded claims.
291291
"""
292292

293293

@@ -409,7 +409,7 @@ def _on_call_handler(func: _C2, request: Request,
409409
def on_request(**kwargs) -> _typing.Callable[[_C1], _C1]:
410410
"""
411411
Handler which handles HTTPS requests.
412-
Requires a function that takes a Request and Response object, same signature as an Flask app.
412+
Requires a function that takes a ``Request`` and ``Response`` object, the same signature as a Flask app.
413413
414414
Example:
415415
@@ -450,7 +450,7 @@ def on_request_wrapped(request: Request) -> Response:
450450
def on_call(**kwargs) -> _typing.Callable[[_C2], _C2]:
451451
"""
452452
Declares a callable method for clients to call using a Firebase SDK.
453-
Requires a function that takes a CallableRequest.
453+
Requires a function that takes a ``CallableRequest``.
454454
455455
Example:
456456
@@ -465,7 +465,7 @@ def example(request: CallableRequest) -> Any:
465465
:rtype: :exc:`typing.Callable`
466466
\\[ \\[ :exc:`firebase_functions.https.CallableRequest` \\[
467467
:exc:`object` \\] \\], :exc:`object` \\]
468-
A function that takes a CallableRequest and returns an :exc:`object`.
468+
A function that takes a ``CallableRequest`` and returns an :exc:`object`.
469469
"""
470470
options = HttpsOptions(**kwargs)
471471

0 commit comments

Comments
 (0)