docs: consistency

This commit is contained in:
Hussain Nagaria 2023-12-19 12:55:41 +05:30
parent 3520bcb9b3
commit c70229cd69
2 changed files with 5 additions and 5 deletions

View file

@ -1003,7 +1003,8 @@ def has_permission(
parent_doctype=None,
):
"""
Return True if the user has permission `ptype` for given `doctype` or `doc`
Return True if the user has permission `ptype` for given `doctype` or `doc`.
Raise `frappe.PermissionError` if user isn't permitted and `throw` is truthy
:param doctype: DocType for which permission is to be check.
@ -1152,7 +1153,7 @@ def set_value(doctype, docname, fieldname, value=None):
def get_cached_doc(*args, **kwargs) -> "Document":
"""Like `frappe.get_doc`, but return from cache if available."""
"""Identical to `frappe.get_doc`, but return from cache if available."""
if (key := can_cache_doc(args)) and (doc := cache.get_value(key)):
return doc

View file

@ -133,9 +133,8 @@ def setup_assets(assets_archive):
return directories_created
def download_frappe_assets(verbose=True):
"""Downloads and sets up Frappe assets if they exist based on the current
commit HEAD.
def download_frappe_assets(verbose=True) -> bool:
"""Download and set up Frappe assets if they exist based on the current commit HEAD.
Return True if correctly setup else return False.
"""
frappe_head = getoutput("cd ../apps/frappe && git rev-parse HEAD")