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:
Chillar Anand
2021-09-03 18:57:43 +05:30
committed by GitHub
parent 910b9bc3f4
commit 4b2be2999f
2103 changed files with 7844 additions and 3106 deletions

View File

@@ -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

View File

@@ -3,8 +3,8 @@
# See license.txt
from __future__ import unicode_literals
import frappe
import unittest
class TestCertificationApplication(unittest.TestCase):
pass

View File

@@ -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

View File

@@ -3,8 +3,8 @@
# See license.txt
from __future__ import unicode_literals
import frappe
import unittest
class TestCertifiedConsultant(unittest.TestCase):
pass

View File

@@ -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",

View File

@@ -5,5 +5,6 @@ from __future__ import unicode_literals
import unittest
class TestChapter(unittest.TestCase):
pass

View File

@@ -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

View File

@@ -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):

View File

@@ -1,6 +1,8 @@
from __future__ import unicode_literals
from frappe import _
def get_data():
return {
'fieldname': 'donation',

View File

@@ -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()

View File

@@ -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):

View File

@@ -5,5 +5,6 @@ from __future__ import unicode_literals
import unittest
class TestDonor(unittest.TestCase):
pass

View File

@@ -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

View File

@@ -3,8 +3,8 @@
# See license.txt
from __future__ import unicode_literals
import unittest
class TestDonorType(unittest.TestCase):
pass

View File

@@ -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(

View File

@@ -5,5 +5,6 @@ from __future__ import unicode_literals
import unittest
class TestGrantApplication(unittest.TestCase):
pass

View File

@@ -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`"""

View File

@@ -1,6 +1,8 @@
from __future__ import unicode_literals
from frappe import _
def get_data():
return {
'heatmap': True,

View File

@@ -5,5 +5,6 @@ from __future__ import unicode_literals
import unittest
class TestMember(unittest.TestCase):
pass

View File

@@ -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):

View File

@@ -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):

View File

@@ -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):

View File

@@ -5,5 +5,6 @@ from __future__ import unicode_literals
import unittest
class TestMembershipType(unittest.TestCase):
pass

View File

@@ -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"):

View File

@@ -6,5 +6,6 @@ from __future__ import unicode_literals
# import frappe
import unittest
class TestNonProfitSettings(unittest.TestCase):
pass

View File

@@ -5,5 +5,6 @@ from __future__ import unicode_literals
import unittest
class TestVolunteer(unittest.TestCase):
pass

View File

@@ -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):

View File

@@ -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

View File

@@ -5,5 +5,6 @@ from __future__ import unicode_literals
import unittest
class TestVolunteerType(unittest.TestCase):
pass

View File

@@ -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

View File

@@ -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)

View File

@@ -1,6 +1,5 @@
from __future__ import unicode_literals
import frappe
def get_context(context):
# do your magic here

View File

@@ -1,6 +1,5 @@
from __future__ import unicode_literals
import frappe
def get_context(context):
# do your magic here

View File

@@ -1,5 +1,6 @@
from __future__ import unicode_literals
def get_context(context):
context.no_cache = True
context.parents = [dict(label='View All ',