Added docstrings to several undocumented functions.

This commit is contained in:
flencydoc 2021-12-15 01:51:21 +00:00
parent 9486b6cf57
commit fb544a8ba5
No known key found for this signature in database
GPG key ID: D4ABA12D2703E322
2 changed files with 28 additions and 0 deletions

View file

@ -326,6 +326,17 @@ class Blueprint(Scaffold):
if first_bp_registration or first_name_registration:
def extend(bp_dict, parent_dict):
"""
Extend a dictionary of breakpoint information with another dictionary.
:param bp_dict: A dictionary of breakpoint information.
:type bp_dict: dict(str, list(int))
:param parent_dict: The parent to which the child is being added. This function will extend it in-place and return None. If you want to use the result, assign it like this ``parent = extend(bp_dict, parent)`` .
Written by Trelent
"""
for key, values in bp_dict.items():
key = name if key is None else f"{name}.{key}"
parent_dict[key].extend(values)

View file

@ -244,6 +244,14 @@ def locate_app(module_name, app_name, raise_if_not_found=True):
def get_version(ctx, param, value):
"""
Prints out the Python version, the Flask version, and the Werkzeug
(a WSGI utility for WSGI applications) version.
Written by Trelent
"""
if not value or ctx.resilient_parsing:
return
@ -292,6 +300,15 @@ class DispatchingApp:
def _load_in_background(self):
def _load_app():
"""
Loads the application and sets up the request context.
This is a private function that does not need to be called from outside of this class. It loads the application, creates a new :class:`~flask_unchained.RequestLocal` object, and pushes it onto ``g`` so that its methods can be used in templates or other functions throughout the request lifecycle.
Written by Trelent
"""
__traceback_hide__ = True # noqa: F841
with self._lock:
try: