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

@@ -1,10 +1,12 @@
from __future__ import unicode_literals
import unittest
import frappe
from erpnext import encode_company_abbr
from six.moves import range
from erpnext import encode_company_abbr
test_records = frappe.get_test_records('Company')
class TestInit(unittest.TestCase):

View File

@@ -2,11 +2,12 @@
# MIT License. See license.txt
from __future__ import unicode_literals
import frappe
import unittest
import frappe
from frappe.desk import notifications
from frappe.test_runner import make_test_objects
class TestNotifications(unittest.TestCase):
def test_get_notifications_for_targets(self):

View File

@@ -1,5 +1,11 @@
from __future__ import unicode_literals
import unittest, frappe, erpnext
import unittest
import frappe
import erpnext
@erpnext.allow_regional
def test_method():

View File

@@ -1,8 +1,11 @@
from __future__ import unicode_literals
import unittest
import frappe
from frappe.contacts.address_and_contact import filter_dynamic_link_doctypes
class TestSearch(unittest.TestCase):
# Search for the word "cond", part of the word "conduire" (Lead) in french.
def test_contact_search_in_foreign_language(self):

View File

@@ -1,16 +1,24 @@
from __future__ import unicode_literals
import frappe
import unittest
import copy
from frappe.utils import cint
import unittest
from collections import defaultdict
from erpnext.stock.doctype.stock_entry.test_stock_entry import make_stock_entry
from erpnext.stock.doctype.serial_no.serial_no import get_serial_nos
from erpnext.stock.doctype.item.test_item import make_item
from erpnext.manufacturing.doctype.production_plan.test_production_plan import make_bom
import frappe
from frappe.utils import cint
from erpnext.buying.doctype.purchase_order.purchase_order import (
get_materials_from_supplier,
make_purchase_invoice,
make_purchase_receipt,
make_rm_stock_entry,
)
from erpnext.buying.doctype.purchase_order.test_purchase_order import create_purchase_order
from erpnext.buying.doctype.purchase_order.purchase_order import (make_rm_stock_entry,
make_purchase_receipt, make_purchase_invoice, get_materials_from_supplier)
from erpnext.manufacturing.doctype.production_plan.test_production_plan import make_bom
from erpnext.stock.doctype.item.test_item import make_item
from erpnext.stock.doctype.serial_no.serial_no import get_serial_nos
from erpnext.stock.doctype.stock_entry.test_stock_entry import make_stock_entry
class TestSubcontracting(unittest.TestCase):
def setUp(self):

View File

@@ -1,7 +1,15 @@
from __future__ import unicode_literals
import unittest, frappe, requests, os, time, erpnext
import os
import time
import unittest
import frappe
import requests
from erpnext.erpnext_integrations.connectors.woocommerce_connection import order
class TestWoocommerce(unittest.TestCase):
def setUp(self):
if not frappe.db.exists('Company', 'Woocommerce'):

View File

@@ -1,6 +1,7 @@
import frappe
from frappe.utils import getdate
@frappe.whitelist()
def create_employee_records():
create_company()

View File

@@ -6,6 +6,7 @@ from contextlib import contextmanager
import frappe
def create_test_contact_and_address():
frappe.db.sql('delete from tabContact')
frappe.db.sql('delete from `tabContact Email`')