mirror of
https://github.com/frappe/erpnext.git
synced 2026-06-04 04:39:11 +00:00
chore: Clean up imports (#27302)
* chore: Added isort to pre-commit config * chore: Sort imports with isort * chore: Clean up imports with pycln * chore: Sort imports with isort * chore: Fix import issues * chore: Clean up sider issues * chore: Remove import errors from flake8 ignore list * chore: Clean up lint issues
This commit is contained in:
@@ -1,9 +1,12 @@
|
||||
## temp utility
|
||||
from __future__ import print_function, unicode_literals
|
||||
|
||||
import frappe
|
||||
from erpnext.utilities.activation import get_level
|
||||
from frappe.utils import cstr
|
||||
|
||||
from erpnext.utilities.activation import get_level
|
||||
|
||||
|
||||
def update_doctypes():
|
||||
for d in frappe.db.sql("""select df.parent, df.fieldname
|
||||
from tabDocField df, tabDocType dt where df.fieldname
|
||||
|
||||
@@ -2,11 +2,14 @@
|
||||
# License: GNU General Public License v3. See license.txt
|
||||
|
||||
from __future__ import unicode_literals
|
||||
import frappe, erpnext
|
||||
|
||||
import frappe
|
||||
from frappe import _
|
||||
from six import iteritems
|
||||
|
||||
import erpnext
|
||||
|
||||
|
||||
def get_level():
|
||||
activation_level = 0
|
||||
sales_data = []
|
||||
|
||||
@@ -3,10 +3,10 @@
|
||||
|
||||
from __future__ import unicode_literals
|
||||
|
||||
from frappe.utils.bot import BotParser
|
||||
|
||||
import frappe
|
||||
from frappe import _
|
||||
from frappe.utils.bot import BotParser
|
||||
|
||||
|
||||
class FindItemBot(BotParser):
|
||||
def get_reply(self):
|
||||
|
||||
@@ -4,11 +4,12 @@
|
||||
# For license information, please see license.txt
|
||||
|
||||
from __future__ import unicode_literals
|
||||
import frappe
|
||||
|
||||
import frappe
|
||||
from frappe.model.document import Document
|
||||
from frappe.model.rename_doc import bulk_rename
|
||||
|
||||
|
||||
class RenameTool(Document):
|
||||
pass
|
||||
|
||||
|
||||
@@ -2,9 +2,9 @@
|
||||
# License: GNU General Public License v3. See license.txt
|
||||
|
||||
from __future__ import unicode_literals
|
||||
import frappe
|
||||
|
||||
from frappe.model.document import Document
|
||||
|
||||
|
||||
class SMSLog(Document):
|
||||
pass
|
||||
|
||||
@@ -3,7 +3,6 @@
|
||||
# See license.txt
|
||||
from __future__ import unicode_literals
|
||||
|
||||
import frappe
|
||||
import unittest
|
||||
|
||||
# test_records = frappe.get_test_records('SMS Log')
|
||||
|
||||
@@ -6,5 +6,6 @@ from __future__ import unicode_literals
|
||||
# import frappe
|
||||
import unittest
|
||||
|
||||
|
||||
class TestVideo(unittest.TestCase):
|
||||
pass
|
||||
|
||||
@@ -3,14 +3,17 @@
|
||||
# For license information, please see license.txt
|
||||
|
||||
from __future__ import unicode_literals
|
||||
import frappe
|
||||
|
||||
import re
|
||||
import pytz
|
||||
from frappe.model.document import Document
|
||||
from frappe import _
|
||||
from datetime import datetime
|
||||
from six import string_types
|
||||
|
||||
import frappe
|
||||
import pytz
|
||||
from frappe import _
|
||||
from frappe.model.document import Document
|
||||
from pyyoutube import Api
|
||||
from six import string_types
|
||||
|
||||
|
||||
class Video(Document):
|
||||
def validate(self):
|
||||
|
||||
@@ -6,5 +6,6 @@ from __future__ import unicode_literals
|
||||
# import frappe
|
||||
import unittest
|
||||
|
||||
|
||||
class TestVideoSettings(unittest.TestCase):
|
||||
pass
|
||||
|
||||
@@ -3,10 +3,12 @@
|
||||
# For license information, please see license.txt
|
||||
|
||||
from __future__ import unicode_literals
|
||||
|
||||
import frappe
|
||||
from apiclient.discovery import build
|
||||
from frappe import _
|
||||
from frappe.model.document import Document
|
||||
from apiclient.discovery import build
|
||||
|
||||
|
||||
class VideoSettings(Document):
|
||||
def validate(self):
|
||||
|
||||
@@ -2,9 +2,11 @@
|
||||
# MIT License. See license.txt
|
||||
|
||||
from __future__ import unicode_literals
|
||||
|
||||
import frappe
|
||||
from frappe import _
|
||||
|
||||
|
||||
@frappe.whitelist()
|
||||
def get_all_nodes(method, company):
|
||||
'''Recursively gets all data from nodes'''
|
||||
|
||||
@@ -4,10 +4,12 @@
|
||||
from __future__ import unicode_literals
|
||||
|
||||
import frappe
|
||||
from frappe.utils import cint, fmt_money, flt, nowdate, getdate
|
||||
from frappe.utils import cint, flt, fmt_money, getdate, nowdate
|
||||
|
||||
from erpnext.accounts.doctype.pricing_rule.pricing_rule import get_pricing_rule_for_item
|
||||
from erpnext.stock.doctype.batch.batch import get_batch_qty
|
||||
|
||||
|
||||
def get_qty_in_stock(item_code, item_warehouse_field, warehouse=None):
|
||||
in_stock, stock_qty = 0, ''
|
||||
template_item_code, is_stock_item = frappe.db.get_value("Item", item_code, ["variant_of", "is_stock_item"])
|
||||
|
||||
@@ -2,10 +2,12 @@
|
||||
# For license information, please see license.txt
|
||||
|
||||
from __future__ import unicode_literals
|
||||
|
||||
import frappe
|
||||
from frappe import _
|
||||
from frappe.utils import flt
|
||||
|
||||
|
||||
def execute(filters=None):
|
||||
if not frappe.db.get_single_value("Video Settings", "enable_youtube_tracking") or not filters:
|
||||
return [], []
|
||||
|
||||
@@ -2,13 +2,15 @@
|
||||
# License: GNU General Public License v3. See license.txt
|
||||
|
||||
from __future__ import unicode_literals
|
||||
|
||||
import frappe
|
||||
import frappe.share
|
||||
from frappe import _
|
||||
from frappe.utils import cstr, now_datetime, cint, flt, get_time, get_datetime, get_link_to_form, date_diff, nowdate
|
||||
from frappe.utils import cint, cstr, flt, get_time, now_datetime
|
||||
from six import string_types
|
||||
|
||||
from erpnext.controllers.status_updater import StatusUpdater
|
||||
|
||||
from six import string_types
|
||||
|
||||
class UOMMustBeIntegerError(frappe.ValidationError): pass
|
||||
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
from __future__ import unicode_literals
|
||||
|
||||
import frappe
|
||||
|
||||
def get_context(context):
|
||||
# do your magic here
|
||||
|
||||
Reference in New Issue
Block a user