Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: Clean up imports #27302

Merged
merged 9 commits into from
Sep 2, 2021
Merged
Prev Previous commit
Next Next commit
chore: Sort imports with isort
  • Loading branch information
ChillarAnand committed Sep 2, 2021
commit d05000ddd641ad83e97be29c7157d4cd7a5cdb73
Original file line number Diff line number Diff line change
Expand Up @@ -3,22 +3,14 @@

from __future__ import unicode_literals


import frappe
from frappe import _
from frappe.utils import (
add_to_date,
formatdate,
get_link_to_form,
getdate,
nowdate
)
from frappe.utils import add_to_date, formatdate, get_link_to_form, getdate, nowdate
from frappe.utils.dashboard import cache_source
from frappe.utils.dateutils import get_from_date_from_timespan, get_period_ending
from frappe.utils.nestedset import get_descendants_of



@frappe.whitelist()
@cache_source
def get(chart_name = None, chart = None, no_cache = None, filters = None, from_date = None,
Expand Down
1 change: 0 additions & 1 deletion erpnext/accounts/doctype/bank/test_bank.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,5 @@
import unittest



class TestBank(unittest.TestCase):
pass
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,5 @@
import unittest



class TestBankGuarantee(unittest.TestCase):
pass
1 change: 0 additions & 1 deletion erpnext/accounts/doctype/c_form/test_c_form.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@

import unittest


# test_records = frappe.get_test_records('C-Form')

class TestCForm(unittest.TestCase):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,5 @@
import unittest



class TestCashierClosing(unittest.TestCase):
pass
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,5 @@
import unittest



class TestChartofAccountsImporter(unittest.TestCase):
pass
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@

import unittest


# test_records = frappe.get_test_records('Cheque Print Template')

class TestChequePrintTemplate(unittest.TestCase):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,5 @@
import unittest



class TestExchangeRateRevaluation(unittest.TestCase):
pass
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,5 @@
import unittest



class TestItemTaxTemplate(unittest.TestCase):
pass
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,5 @@
import unittest



class TestLoyaltyPointEntry(unittest.TestCase):
pass
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
from __future__ import unicode_literals



def get_data():
return {
'fieldname': 'loyalty_program',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@

import unittest


# test_records = frappe.get_test_records('Mode of Payment')

class TestModeofPayment(unittest.TestCase):
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
from __future__ import unicode_literals



def get_data():
return {
'fieldname': 'payment_gateway_account',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@

import unittest


# test_records = frappe.get_test_records('Payment Gateway Account')

class TestPaymentGatewayAccount(unittest.TestCase):
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
from __future__ import unicode_literals



def get_data():
return {
'fieldname': 'payment_order',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,7 @@
from frappe.utils import flt, getdate, nowdate, today

import erpnext
from erpnext.accounts.utils import (
get_outstanding_invoices,
reconcile_against_document
)
from erpnext.accounts.utils import get_outstanding_invoices, reconcile_against_document
from erpnext.controllers.accounts_controller import get_advance_payment_entries


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

from __future__ import unicode_literals


import frappe
from frappe import _
from frappe.utils import flt, get_datetime
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@

import unittest


# test_records = frappe.get_test_records('Purchase Taxes and Charges Template')

class TestPurchaseTaxesandChargesTemplate(unittest.TestCase):
Expand Down
4 changes: 2 additions & 2 deletions erpnext/accounts/doctype/sales_invoice/sales_invoice.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@
import erpnext
from erpnext.accounts.deferred_revenue import validate_service_stop_date
from erpnext.accounts.doctype.loyalty_program.loyalty_program import (
get_loyalty_program_details_with_points,
validate_loyalty_points
get_loyalty_program_details_with_points,
validate_loyalty_points,
)
from erpnext.accounts.doctype.tax_withholding_category.tax_withholding_category import (
get_party_tax_withholding_details,
Expand Down
1 change: 0 additions & 1 deletion erpnext/accounts/doctype/share_type/test_share_type.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,5 @@
import unittest



class TestShareType(unittest.TestCase):
pass
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
from __future__ import unicode_literals



def get_data():
return {
'fieldname': 'shareholder',
Expand Down
1 change: 0 additions & 1 deletion erpnext/accounts/doctype/shareholder/test_shareholder.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,5 @@
import unittest



class TestShareholder(unittest.TestCase):
pass
4 changes: 2 additions & 2 deletions erpnext/accounts/doctype/subscription/test_subscription.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@

import frappe
from frappe.utils.data import (
add_days,
add_days,
add_months,
add_to_date,
date_diff,
flt,
get_date_str,
nowdate
nowdate,
)

from erpnext.accounts.doctype.subscription.subscription import get_prorata_factor
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,5 @@
import unittest



class TestTaxCategory(unittest.TestCase):
pass
5 changes: 1 addition & 4 deletions erpnext/accounts/doctype/tax_rule/test_tax_rule.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,7 @@

import frappe

from erpnext.accounts.doctype.tax_rule.tax_rule import (
ConflictingTaxRule,
get_tax_template
)
from erpnext.accounts.doctype.tax_rule.tax_rule import ConflictingTaxRule, get_tax_template
from erpnext.crm.doctype.opportunity.opportunity import make_quotation
from erpnext.crm.doctype.opportunity.test_opportunity import make_opportunity

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
from __future__ import unicode_literals



def get_data():
return {
'fieldname': 'tax_withholding_category',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@

from __future__ import unicode_literals


from erpnext.accounts.report.accounts_receivable.accounts_receivable import ReceivablePayableReport


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@

from __future__ import unicode_literals


from erpnext.accounts.report.accounts_receivable_summary.accounts_receivable_summary import (
AccountsReceivableSummary,
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
from frappe.utils import flt



def execute(filters=None):
columns, data = get_columns(), get_data(filters)
return columns, data
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
from six import iteritems, itervalues



class PartyLedgerSummaryReport(object):
def __init__(self, filters=None):
self.filters = frappe._dict(filters or {})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@

import erpnext
from erpnext.accounts.report.item_wise_sales_register.item_wise_sales_register import (
add_sub_total_row,
add_sub_total_row,
add_total_row,
get_grand_total,
get_group_by_and_display_fields,
get_group_by_conditions,
get_tax_accounts
get_tax_accounts,
)
from erpnext.selling.report.item_wise_sales_history.item_wise_sales_history import get_item_details

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@

from __future__ import unicode_literals


from erpnext.controllers.trends import get_columns, get_data


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@

from __future__ import unicode_literals


from erpnext.controllers.trends import get_columns, get_data


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@

from __future__ import unicode_literals


from erpnext.accounts.report.customer_ledger_summary.customer_ledger_summary import (
PartyLedgerSummaryReport,
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,5 @@
import unittest



class TestAgricultureAnalysisCriteria(unittest.TestCase):
pass
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,5 @@
import unittest



class TestAgricultureTask(unittest.TestCase):
pass
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,5 @@
import unittest



class TestPlantAnalysis(unittest.TestCase):
pass
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,5 @@
import unittest



class TestSoilAnalysis(unittest.TestCase):
pass
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,5 @@
import unittest



class TestWaterAnalysis(unittest.TestCase):
pass
1 change: 0 additions & 1 deletion erpnext/agriculture/doctype/weather/test_weather.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,5 @@
import unittest



class TestWeather(unittest.TestCase):
pass
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
from __future__ import unicode_literals



def get_data():
return {
'docstatus': 1,
Expand Down
5 changes: 1 addition & 4 deletions erpnext/buying/doctype/supplier/supplier.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,7 @@
)
from frappe.model.naming import set_name_by_naming_series

from erpnext.accounts.party import (
get_dashboard_info,
validate_party_accounts
)
from erpnext.accounts.party import get_dashboard_info, validate_party_accounts
from erpnext.utilities.transaction_base import TransactionBase


Expand Down
5 changes: 1 addition & 4 deletions erpnext/controllers/accounts_controller.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,7 @@

import frappe
from frappe import _, throw
from frappe.model.workflow import (
get_workflow_name,
is_transition_condition_satisfied
)
from frappe.model.workflow import get_workflow_name, is_transition_condition_satisfied
from frappe.utils import (
add_days,
add_months,
Expand Down
1 change: 0 additions & 1 deletion erpnext/controllers/buying_controller.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@

from __future__ import unicode_literals


import frappe
from frappe import _, msgprint
from frappe.contacts.doctype.address.address import get_address_display
Expand Down
1 change: 0 additions & 1 deletion erpnext/controllers/print_settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
from __future__ import unicode_literals



def set_print_templates_for_item_table(doc, settings):
doc.print_templates = {
"items": "templates/print_formats/includes/items.html",
Expand Down
Loading