Skip to content

Making some style and format fixes. #117

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jul 13, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions src/firebase_functions/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
@_dataclass.dataclass(frozen=True)
class CloudEvent(_typing.Generic[T]):
"""
A Cloud Event is the base of a cross-platform format for encoding a serverless event.
A CloudEvent is the base of a cross-platform format for encoding a serverless event.
More information can be found at https://github.com/cloudevents/spec
"""

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

subject: str | None
"""
The resource, provided by source, that this event relates to
The resource, provided by source, that this event relates to.
"""


@_dataclass.dataclass(frozen=True)
class Change(_typing.Generic[T]):
"""
* The Functions interface for events that change state, such as
* Realtime Database `on_value_written`.
The Cloud Functions interface for events that change state, such as
Realtime Database `on_value_written`.
"""

before: T
Expand Down
20 changes: 10 additions & 10 deletions src/firebase_functions/https_fn.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
"""Module for Cloud Functions that listen to HTTPS endpoints.
"""Module for functions that listen to HTTPS endpoints.
These can be raw web requests and Callable RPCs.
"""
# pylint: disable=protected-access
Expand All @@ -32,7 +32,7 @@

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

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

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

uid: str
"""
User ID of the Id token.
User ID of the ID token.
"""

token: dict[str, _typing.Any]
"""
The Id token's decoded claims.
The ID token's decoded claims.
"""


Expand Down Expand Up @@ -409,7 +409,7 @@ def _on_call_handler(func: _C2, request: Request,
def on_request(**kwargs) -> _typing.Callable[[_C1], _C1]:
"""
Handler which handles HTTPS requests.
Requires a function that takes a Request and Response object, same signature as an Flask app.
Requires a function that takes a ``Request`` and ``Response`` object, the same signature as a Flask app.

Example:

Expand Down Expand Up @@ -450,7 +450,7 @@ def on_request_wrapped(request: Request) -> Response:
def on_call(**kwargs) -> _typing.Callable[[_C2], _C2]:
"""
Declares a callable method for clients to call using a Firebase SDK.
Requires a function that takes a CallableRequest.
Requires a function that takes a ``CallableRequest``.

Example:

Expand All @@ -465,7 +465,7 @@ def example(request: CallableRequest) -> Any:
:rtype: :exc:`typing.Callable`
\\[ \\[ :exc:`firebase_functions.https.CallableRequest` \\[
:exc:`object` \\] \\], :exc:`object` \\]
A function that takes a CallableRequest and returns an :exc:`object`.
A function that takes a ``CallableRequest`` and returns an :exc:`object`.
"""
options = HttpsOptions(**kwargs)

Expand Down