* fix(contact): force type check in contact whitelisted methods
* fix(google_indexing): force type check in google_indexing whitelisted methods
* fix(assignment_rule): add type checks to assignment_rule whitelisted methods
* refactor: remove unused args
* fix(queue): add type hints to whitelisted methods in queue.py
* fix(auto_email_report): add type hints to whitelisted methods
* fix(dashboard): add type hints to whitelisted methods
* fix(sidebar_item_group): add type hints to whitelisted methods
* fix(weasyprint): add type hints to whitelisted methods
* fix(backups): add type hints to whitelisted methods
* fix(document_naming_settings): add type hints to whitelisted methods
* fix(get_latest_submissions): add type hints to whitelisted methods
* fix(custom_field): add type hints to whitelisted methods
* fix(customize_form): add type hints to whitelisted methods
* fix(personal_data_deletion_request): add type hints to whitelisted functions
* fix(__init__): add type hints to whitelisted methods
* fix(prepared_report): add type hints to whitelisted methods
* fix(session_default_settings): add type hints to whitelisted methods
* fix(document_follow): add type hints to whitelisted methods
* fix(route_history): add type hints to whitelisted methods
* fix(form_tour): add type hints to whitelisted methods
* fix(dashboard_settings): add type hints to whitelisted methods
* fix(address): add type hints to whitelisted methods
* fix(contact): add type hints to whitelisted methods
* fix(discussion_reply): add type hints to whitelisted methods
* fix(auto_repeat): add type hints to whitelisted methods
* fix: add the missing type hints and misc. corrections
* fix(email): add type hints to whitelisted methods
* fix(permitted_documents_for_users): add type hints to whitelisted methods
* fix: correct the type hints
* fix: int PK types
---------
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Co-authored-by: Ankush Menat <ankushmenat@gmail.com>
Co-authored-by: Ankush Menat <ankush@frappe.io>
* fix(system console): allow read-only queries in system console
* fix(security): make transactions strictly read only for console and scripts
* test: remove test to reflect ban on cte's for security
* fix: Only enable read only mode for SQL query
---------
Co-authored-by: Ankush Menat <ankush@frappe.io>
* fix: remove redundant isinstance check in encode_dict
The encode_dict function was checking isinstance(d[key], str) twice,
which is redundant. Removed the duplicate check to clean up the code.
This is a simple code quality improvement that removes unnecessary
redundancy in the type checking logic.
* fix: correct decode_dict to check for bytes instead of always-false condition
The decode_dict function had a logic error:
'isinstance(d[key], str) and not isinstance(d[key], str)' is always False.
It should check for bytes instead, since decode() is called on bytes objects.
This fixes the decode_dict function to properly decode bytes to strings.
* fix: remove redundant isinstance check in encode_dict
---------
Co-authored-by: Daniel Miner <daniel@gittensor.miner>
* Refactor: Rejuvenation using match/case in format_value
* refactor(format_value): rejuvenation using match/case (PEP 634) (#34594)
* refactor: if for match
* style: fix code formatting and indentation for consistency
* chore: format
Signed-off-by: Akhil Narang <me@akhilnarang.dev>
---------
Signed-off-by: Akhil Narang <me@akhilnarang.dev>
Co-authored-by: Akhil Narang <me@akhilnarang.dev>