perf: Simplify dynamic route evaluation to speed up route resolution by surajshetty3416 [frappe] PR#23698
From: https://github.com/frappe/frappe/pull/23698
Date: 2023-12-08 21:15:34+05:30
- perf: Simplify dynamic route evaluation to speed up route resolution
- perf: Use get_cached_doc instead of get_doc - Makes document pages with no-cache load a bit faster
Diagnostics
pre-commit failed for source commit: bc2b41d2f5dc01d8d47b3efdf122bbd367a94e25
check python ast.........................................................Failed
- hook id: check-ast
- exit code: 1
frappe/website/doctype/web_form/web_form.py: failed parsing with CPython 3.10.13:
Traceback (most recent call last):
File "/root/.cache/pre-commit/repowzi890ib/py_env-python3.10/lib/python3.10/site-packages/pre_commit_hooks/check_ast.py", line 21, in main
ast.parse(f.read(), filename=filename)
File "/usr/local/lib/python3.10/ast.py", line 50, in parse
return compile(source, filename, mode, flags,
File "frappe/website/doctype/web_form/web_form.py", line 272
if df.fieldtype in ("Select"):
^
IndentationError: unexpected indent
debug statements (python)................................................Failed
- hook id: debug-statements
- exit code: 1
frappe/website/doctype/web_form/web_form.py - Could not parse ast
Traceback (most recent call last):
File "/root/.cache/pre-commit/repowzi890ib/py_env-python3.10/lib/python3.10/site-packages/pre_commit_hooks/debug_statement_hook.py", line 56, in check_file
ast_obj = ast.parse(f.read(), filename=filename)
File "/usr/local/lib/python3.10/ast.py", line 50, in parse
return compile(source, filename, mode, flags,
File "frappe/website/doctype/web_form/web_form.py", line 272
if df.fieldtype in ("Select"):
^
IndentationError: unexpected indent
flake8...................................................................Failed
- hook id: flake8
- exit code: 1
frappe/website/doctype/web_form/web_form.py:272:4: E999 IndentationError: unexpected indent
Checkout instructions
# Checkout locally
git fetch upstream
git switch ft-pr-23698
# Make changes then rebase
git rebase -i upstream/develop --reapply-cherry-picks
# Fix or ignore conflicts
git checkout --theirs .
git rebase --continue
# Force-push changes
git push --force-with-lease