* fix(diff): add type hints to whitelisted methods
* fix(global_search): add type hints to whitelisted methods
* fix(custom_html_block): add type hints to whitelisted methods
* fix(deleted_document): add type hints to whitelisted methods
* fix(log_settings): add type hints to whitelisted methods
* fix(role): add type hints to whitelisted methods
* fix(user_type): add type hints to whitelisted methods
* fix(rq_job): add type hints to whitelisted methods
* fix(link_preview): add type hints to whitelisted methods
* fix(email_account): add type hints to whitelisted methods
* fix(web_form): add type hints to whitelisted methods
* fix(web_page_view): add type hints to whitelisted methods
* fix(csvutils): add type hints to whitelisted methods
* fix(file_manager): add type hints to whitelisted methods
* fix(email_body): add type hints to whitelisted methods
* fix(email_queue): add type hints to whitelisted methods
* fix(email_template): add type hints to whitelisted methods
* fix(notification): add type hints to whitelisted methods
* fix(email_group): add type hints to whitelisted methods
* fix(inbox): add type hints to whitelisted methods
* fix(recorder): add type hints to whitelisted methods
* fix(sms_settings): add type hints to whitelisted methods
* fix: tighten type hints
* fix(data_import): add type hints to whitelisted methods
* fix(user_permission): add type hints to whitelisted methods
* fix(gantt): add type hints to whitelisted methods
* fix(like): add type hints to whitelisted methods
* fix(search): add type hints to whitelisted methods
* fix(onboarding_step): add type hints to whitelisted methods
* fix(system_console): add type hints to whitelisted methods
* fix(workspace_sidebar): add type hints to whitelisted methods
* fix(todo): add type hints to whitelisted methods
* fix: correct type hints
* fix(print_format): add type hints to whitelisted methods
* fix(client): add type hints to whitelisted methods
In a new installment of *"how did it ever work"* - global search wasn't
filtering by the matched filter, just ranking. I have no idea why this
is being done here but it's far from a good idea from performance POV.
Not adding `MATCH` in where clause makes the fulltext index worthless.
* Refactor type checks defined in APIs
* Remove dead/deprecated kwargs usages
* Added appropriate hints to APIs and consecutive utils defined in the following modules:
- frappe.realtime
- frappe.translate
- frappe.utils.global_search
- frappe.www.third_party_apps
- frappe.www.search
- frappe.www.printview
refactor: clean up code to py39+ supported syntax
- f-strings instead of format
- latest typing support instead of pre 3.9 TitleCase
- remove UTF-8 declarations.
- many more changes
Powered by https://github.com/asottile/pyupgrade/ + manual cleanups
Converted all possible usages of re.* that weren't compiling the regex
separately and re-using it. Separated out the compiled patterns as
global variables. Repetitive patterns could be made DRY-er.
Would be nicer to have all regexes in a single module so that we could
re-use better, keep track of outdated, and keep checks for possible
reDos' etc
These modules were imported from the ERPNext codebase into Frappe.
License header was overlooked at that point. These were contributed
initially by Frappe Technologies Pvt Ltd under GPLv3 (ERPNext's license) and now
we, as Frappe Technologies Pvt Ltd converting them to MIT to comply with
Frappe's license.
Previously start was being type casted with int. That was reverted by refactoring query to use new Query Builder
This bug was introduced via ee3c84beef
* Remove six for PY2 compatability since our dependencies are not, PY2
is legacy.
* Removed usages of utils from future/past libraries since they are
deprecated. This includes 'from __future__ ...' and 'from past...'
statements.
* Removed compatibility imports for PY2, switched from six imports to
standard library imports.
* Removed utils code blocks that handle operations depending on PY2/3
versions.
* Removed 'from __future__ ...' lines from templates/code generators
* Used PY3 syntaxes in place of PY2 compatible blocks. eg: metaclass