Files
schuetz3-erpnext/.github/helper/semgrep_rules/ux.py
Chillar Anand 4b2be2999f chore: Cleanup imports (#27320)
* chore: Added isort to pre-commit config

* chore: Sort imports with isort

* chore: Remove imports with pycln

* chore: Sort imports with isort

* chore: Fix import issues

* chore: Fix sider issues

* chore: linting

* chore: linting / sorting import

from ecommerce refactor merge

* ci: dont allow unused imports

* chore: sort / clean ecommerce imports

Co-authored-by: Ankush Menat <ankush@iwebnotes.com>
2021-09-03 18:57:43 +05:30

31 lines
763 B
Python

import frappe
from frappe import _, msgprint, throw
# ruleid: frappe-missing-translate-function-python
throw("Error Occured")
# ruleid: frappe-missing-translate-function-python
frappe.throw("Error Occured")
# ruleid: frappe-missing-translate-function-python
frappe.msgprint("Useful message")
# ruleid: frappe-missing-translate-function-python
msgprint("Useful message")
# ok: frappe-missing-translate-function-python
translatedmessage = _("Hello")
# ok: frappe-missing-translate-function-python
throw(translatedmessage)
# ok: frappe-missing-translate-function-python
msgprint(translatedmessage)
# ok: frappe-missing-translate-function-python
msgprint(_("Helpful message"))
# ok: frappe-missing-translate-function-python
frappe.throw(_("Error occured"))