mirror of
https://github.com/frappe/erpnext.git
synced 2026-06-05 13:24:47 +00:00
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>
This commit is contained in:
@@ -3,8 +3,9 @@
|
||||
# For license information, please see license.txt
|
||||
|
||||
from __future__ import unicode_literals
|
||||
import frappe
|
||||
|
||||
from frappe.model.document import Document
|
||||
|
||||
|
||||
class CertificationApplication(Document):
|
||||
pass
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
# See license.txt
|
||||
from __future__ import unicode_literals
|
||||
|
||||
import frappe
|
||||
import unittest
|
||||
|
||||
|
||||
class TestCertificationApplication(unittest.TestCase):
|
||||
pass
|
||||
|
||||
@@ -3,8 +3,9 @@
|
||||
# For license information, please see license.txt
|
||||
|
||||
from __future__ import unicode_literals
|
||||
import frappe
|
||||
|
||||
from frappe.model.document import Document
|
||||
|
||||
|
||||
class CertifiedConsultant(Document):
|
||||
pass
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
# See license.txt
|
||||
from __future__ import unicode_literals
|
||||
|
||||
import frappe
|
||||
import unittest
|
||||
|
||||
|
||||
class TestCertifiedConsultant(unittest.TestCase):
|
||||
pass
|
||||
|
||||
@@ -3,9 +3,11 @@
|
||||
# For license information, please see license.txt
|
||||
|
||||
from __future__ import unicode_literals
|
||||
|
||||
import frappe
|
||||
from frappe.website.website_generator import WebsiteGenerator
|
||||
|
||||
|
||||
class Chapter(WebsiteGenerator):
|
||||
_website = frappe._dict(
|
||||
condition_field = "published",
|
||||
|
||||
@@ -5,5 +5,6 @@ from __future__ import unicode_literals
|
||||
|
||||
import unittest
|
||||
|
||||
|
||||
class TestChapter(unittest.TestCase):
|
||||
pass
|
||||
|
||||
@@ -3,7 +3,9 @@
|
||||
# For license information, please see license.txt
|
||||
|
||||
from __future__ import unicode_literals
|
||||
|
||||
from frappe.model.document import Document
|
||||
|
||||
|
||||
class ChapterMember(Document):
|
||||
pass
|
||||
|
||||
@@ -3,15 +3,19 @@
|
||||
# For license information, please see license.txt
|
||||
|
||||
from __future__ import unicode_literals
|
||||
|
||||
import json
|
||||
|
||||
import frappe
|
||||
import six
|
||||
import json
|
||||
from frappe.model.document import Document
|
||||
from frappe import _
|
||||
from frappe.utils import getdate, flt, get_link_to_form
|
||||
from frappe.email import sendmail_to_system_managers
|
||||
from frappe.model.document import Document
|
||||
from frappe.utils import flt, get_link_to_form, getdate
|
||||
|
||||
from erpnext.non_profit.doctype.membership.membership import verify_signature
|
||||
|
||||
|
||||
class Donation(Document):
|
||||
def validate(self):
|
||||
if not self.donor or not frappe.db.exists('Donor', self.donor):
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
from __future__ import unicode_literals
|
||||
|
||||
from frappe import _
|
||||
|
||||
|
||||
def get_data():
|
||||
return {
|
||||
'fieldname': 'donation',
|
||||
|
||||
@@ -3,10 +3,13 @@
|
||||
# See license.txt
|
||||
from __future__ import unicode_literals
|
||||
|
||||
import frappe
|
||||
import unittest
|
||||
|
||||
import frappe
|
||||
|
||||
from erpnext.non_profit.doctype.donation.donation import create_donation
|
||||
|
||||
|
||||
class TestDonation(unittest.TestCase):
|
||||
def setUp(self):
|
||||
create_donor_type()
|
||||
|
||||
@@ -3,8 +3,10 @@
|
||||
# For license information, please see license.txt
|
||||
|
||||
from __future__ import unicode_literals
|
||||
from frappe.model.document import Document
|
||||
|
||||
from frappe.contacts.address_and_contact import load_address_and_contact
|
||||
from frappe.model.document import Document
|
||||
|
||||
|
||||
class Donor(Document):
|
||||
def onload(self):
|
||||
|
||||
@@ -5,5 +5,6 @@ from __future__ import unicode_literals
|
||||
|
||||
import unittest
|
||||
|
||||
|
||||
class TestDonor(unittest.TestCase):
|
||||
pass
|
||||
|
||||
@@ -3,7 +3,9 @@
|
||||
# For license information, please see license.txt
|
||||
|
||||
from __future__ import unicode_literals
|
||||
|
||||
from frappe.model.document import Document
|
||||
|
||||
|
||||
class DonorType(Document):
|
||||
pass
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
# See license.txt
|
||||
from __future__ import unicode_literals
|
||||
|
||||
|
||||
import unittest
|
||||
|
||||
|
||||
class TestDonorType(unittest.TestCase):
|
||||
pass
|
||||
|
||||
@@ -3,11 +3,13 @@
|
||||
# For license information, please see license.txt
|
||||
|
||||
from __future__ import unicode_literals
|
||||
|
||||
import frappe
|
||||
from frappe import _
|
||||
from frappe.website.website_generator import WebsiteGenerator
|
||||
from frappe.contacts.address_and_contact import load_address_and_contact
|
||||
from frappe.utils import get_url
|
||||
from frappe.website.website_generator import WebsiteGenerator
|
||||
|
||||
|
||||
class GrantApplication(WebsiteGenerator):
|
||||
_website = frappe._dict(
|
||||
|
||||
@@ -5,5 +5,6 @@ from __future__ import unicode_literals
|
||||
|
||||
import unittest
|
||||
|
||||
|
||||
class TestGrantApplication(unittest.TestCase):
|
||||
pass
|
||||
|
||||
@@ -3,14 +3,17 @@
|
||||
# For license information, please see license.txt
|
||||
|
||||
from __future__ import unicode_literals
|
||||
|
||||
import frappe
|
||||
from frappe import _
|
||||
from frappe.model.document import Document
|
||||
from frappe.contacts.address_and_contact import load_address_and_contact
|
||||
from frappe.utils import cint, get_link_to_form
|
||||
from frappe.integrations.utils import get_payment_gateway_controller
|
||||
from frappe.model.document import Document
|
||||
from frappe.utils import cint, get_link_to_form
|
||||
|
||||
from erpnext.non_profit.doctype.membership_type.membership_type import get_membership_type
|
||||
|
||||
|
||||
class Member(Document):
|
||||
def onload(self):
|
||||
"""Load address and contacts in `__onload`"""
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
from __future__ import unicode_literals
|
||||
|
||||
from frappe import _
|
||||
|
||||
|
||||
def get_data():
|
||||
return {
|
||||
'heatmap': True,
|
||||
|
||||
@@ -5,5 +5,6 @@ from __future__ import unicode_literals
|
||||
|
||||
import unittest
|
||||
|
||||
|
||||
class TestMember(unittest.TestCase):
|
||||
pass
|
||||
|
||||
@@ -3,17 +3,20 @@
|
||||
# For license information, please see license.txt
|
||||
|
||||
from __future__ import unicode_literals
|
||||
|
||||
import json
|
||||
from datetime import datetime
|
||||
|
||||
import frappe
|
||||
import six
|
||||
import os
|
||||
from datetime import datetime
|
||||
from frappe.model.document import Document
|
||||
from frappe.email import sendmail_to_system_managers
|
||||
from frappe.utils import add_days, add_years, nowdate, getdate, add_months, get_link_to_form
|
||||
from erpnext.non_profit.doctype.member.member import create_member
|
||||
from frappe import _
|
||||
from frappe.email import sendmail_to_system_managers
|
||||
from frappe.model.document import Document
|
||||
from frappe.utils import add_days, add_months, add_years, get_link_to_form, getdate, nowdate
|
||||
|
||||
import erpnext
|
||||
from erpnext.non_profit.doctype.member.member import create_member
|
||||
|
||||
|
||||
class Membership(Document):
|
||||
def validate(self):
|
||||
|
||||
@@ -2,12 +2,16 @@
|
||||
# Copyright (c) 2017, Frappe Technologies Pvt. Ltd. and Contributors
|
||||
# See license.txt
|
||||
from __future__ import unicode_literals
|
||||
|
||||
import unittest
|
||||
|
||||
import frappe
|
||||
from frappe.utils import add_months, nowdate
|
||||
|
||||
import erpnext
|
||||
from erpnext.non_profit.doctype.member.member import create_member
|
||||
from erpnext.non_profit.doctype.membership.membership import update_halted_razorpay_subscription
|
||||
from frappe.utils import nowdate, add_months
|
||||
|
||||
|
||||
class TestMembership(unittest.TestCase):
|
||||
def setUp(self):
|
||||
|
||||
@@ -3,9 +3,11 @@
|
||||
# For license information, please see license.txt
|
||||
|
||||
from __future__ import unicode_literals
|
||||
from frappe.model.document import Document
|
||||
|
||||
import frappe
|
||||
from frappe import _
|
||||
from frappe.model.document import Document
|
||||
|
||||
|
||||
class MembershipType(Document):
|
||||
def validate(self):
|
||||
|
||||
@@ -5,5 +5,6 @@ from __future__ import unicode_literals
|
||||
|
||||
import unittest
|
||||
|
||||
|
||||
class TestMembershipType(unittest.TestCase):
|
||||
pass
|
||||
|
||||
@@ -3,11 +3,13 @@
|
||||
# For license information, please see license.txt
|
||||
|
||||
from __future__ import unicode_literals
|
||||
|
||||
import frappe
|
||||
from frappe import _
|
||||
from frappe.integrations.utils import get_payment_gateway_controller
|
||||
from frappe.model.document import Document
|
||||
|
||||
|
||||
class NonProfitSettings(Document):
|
||||
@frappe.whitelist()
|
||||
def generate_webhook_secret(self, field="membership_webhook_secret"):
|
||||
|
||||
@@ -6,5 +6,6 @@ from __future__ import unicode_literals
|
||||
# import frappe
|
||||
import unittest
|
||||
|
||||
|
||||
class TestNonProfitSettings(unittest.TestCase):
|
||||
pass
|
||||
|
||||
@@ -5,5 +5,6 @@ from __future__ import unicode_literals
|
||||
|
||||
import unittest
|
||||
|
||||
|
||||
class TestVolunteer(unittest.TestCase):
|
||||
pass
|
||||
|
||||
@@ -3,8 +3,10 @@
|
||||
# For license information, please see license.txt
|
||||
|
||||
from __future__ import unicode_literals
|
||||
from frappe.model.document import Document
|
||||
|
||||
from frappe.contacts.address_and_contact import load_address_and_contact
|
||||
from frappe.model.document import Document
|
||||
|
||||
|
||||
class Volunteer(Document):
|
||||
def onload(self):
|
||||
|
||||
@@ -3,8 +3,9 @@
|
||||
# For license information, please see license.txt
|
||||
|
||||
from __future__ import unicode_literals
|
||||
import frappe
|
||||
|
||||
from frappe.model.document import Document
|
||||
|
||||
|
||||
class VolunteerSkill(Document):
|
||||
pass
|
||||
|
||||
@@ -5,5 +5,6 @@ from __future__ import unicode_literals
|
||||
|
||||
import unittest
|
||||
|
||||
|
||||
class TestVolunteerType(unittest.TestCase):
|
||||
pass
|
||||
|
||||
@@ -3,7 +3,9 @@
|
||||
# For license information, please see license.txt
|
||||
|
||||
from __future__ import unicode_literals
|
||||
|
||||
from frappe.model.document import Document
|
||||
|
||||
|
||||
class VolunteerType(Document):
|
||||
pass
|
||||
|
||||
@@ -2,8 +2,10 @@
|
||||
# For license information, please see license.txt
|
||||
|
||||
from __future__ import unicode_literals
|
||||
|
||||
import frappe
|
||||
from frappe import _,msgprint
|
||||
from frappe import _
|
||||
|
||||
|
||||
def execute(filters=None):
|
||||
columns = get_columns(filters)
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
from __future__ import unicode_literals
|
||||
|
||||
import frappe
|
||||
|
||||
def get_context(context):
|
||||
# do your magic here
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
from __future__ import unicode_literals
|
||||
|
||||
import frappe
|
||||
|
||||
def get_context(context):
|
||||
# do your magic here
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
from __future__ import unicode_literals
|
||||
|
||||
|
||||
def get_context(context):
|
||||
context.no_cache = True
|
||||
context.parents = [dict(label='View All ',
|
||||
|
||||
Reference in New Issue
Block a user