chore: whitespace cleanup from codebase (#27023)

* chore: mass trailing whitespace and EOF fixes

* chore: update git-blame-ignore-revs
This commit is contained in:
Ankush Menat 2021-08-19 14:09:54 +05:30 committed by GitHub
commit 0ef5247e2f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1191 changed files with 1355 additions and 1604 deletions

View File

@ -13,3 +13,6 @@
# This commit just changes spaces to tabs for indentation in some files
5f473611bd6ed57703716244a054d3fb5ba9cd23
# Whitespace fix throughout codebase
4551d7d6029b6f587f6c99d4f8df5519241c6a86

View File

@ -450,5 +450,3 @@ def get_deferred_booking_accounts(doctype, voucher_detail_no, dr_or_cr):
return debit_account
else:
return credit_account

View File

@ -113,5 +113,3 @@ def disable_dimension():
dimension2 = frappe.get_doc("Accounting Dimension", "Location")
dimension2.disabled = 1
dimension2.save()

View File

@ -105,4 +105,3 @@ def unclear_reference_payment(doctype, docname):
frappe.db.set_value(doc.payment_document, doc.payment_entry, "clearance_date", None)
return doc.payment_entry

View File

@ -18,5 +18,3 @@ class CashFlowMapping(Document):
frappe._('You can only select a maximum of one option from the list of check boxes.'),
title='Error'
)

View File

@ -62,6 +62,3 @@ def create_cost_center(**args):
cc.is_group = args.is_group or 0
cc.parent_cost_center = args.parent_cost_center or "_Test Company - _TC"
cc.insert()

View File

@ -124,6 +124,3 @@ class TestCouponCode(unittest.TestCase):
so.submit()
self.assertEqual(frappe.db.get_value("Coupon Code", "SAVE30", "used"), 1)

View File

@ -39,4 +39,3 @@ class ModeofPayment(Document):
message = "POS Profile " + frappe.bold(", ".join(pos_profiles)) + " contains \
Mode of Payment " + frappe.bold(str(self.name)) + ". Please remove them to disable this mode."
frappe.throw(_(message), title="Not Allowed")

View File

@ -241,4 +241,3 @@ def get_temporary_opening_account(company=None):
frappe.throw(_("Please add a Temporary Opening account in Chart of Accounts"))
return accounts[0].name

View File

@ -147,4 +147,3 @@ class TestPOSInvoiceMergeLog(unittest.TestCase):
frappe.set_user("Administrator")
frappe.db.sql("delete from `tabPOS Profile`")
frappe.db.sql("delete from `tabPOS Invoice`")

View File

@ -26,4 +26,3 @@ QUnit.test("test pricing rule", function(assert) {
() => done()
]);
});

View File

@ -72,4 +72,3 @@ QUnit.test("test purchase invoice", function(assert) {
() => done()
]);
});

View File

@ -26,4 +26,3 @@ QUnit.test("test sales taxes and charges template", function(assert) {
() => done()
]);
});

View File

@ -40,4 +40,3 @@ QUnit.test("test sales Invoice", function(assert) {
() => done()
]);
});

View File

@ -33,4 +33,3 @@ QUnit.test("test sales invoice with margin", function(assert) {
() => done()
]);
});

View File

@ -54,4 +54,3 @@ QUnit.test("test sales Invoice with payment", function(assert) {
() => done()
]);
});

View File

@ -49,4 +49,3 @@ QUnit.test("test sales Invoice with payment request", function(assert) {
() => done()
]);
});

View File

@ -42,4 +42,3 @@ QUnit.test("test sales Invoice with serialize item", function(assert) {
() => done()
]);
});

View File

@ -26,4 +26,3 @@ QUnit.test("test sales taxes and charges template", function(assert) {
() => done()
]);
});

View File

@ -34,4 +34,3 @@ QUnit.test("test Shipping Rule", function(assert) {
() => done()
]);
});

View File

@ -34,4 +34,3 @@ QUnit.test("test Shipping Rule", function(assert) {
() => done()
]);
});

View File

@ -630,5 +630,3 @@ class TestSubscription(unittest.TestCase):
subscription.process()
self.assertEqual(len(subscription.invoices), 1)

View File

@ -27,4 +27,3 @@
{{ _("Authorized Signatory") }}
</p>
</div>

View File

@ -62,8 +62,3 @@ def make_sales_invoice():
income_account = 'Sales - _TC2',
expense_account = 'Cost of Goods Sold - _TC2',
cost_center = 'Main - _TC2')

View File

@ -136,4 +136,3 @@ frappe.query_reports["Accounts Payable"] = {
}
erpnext.utils.add_dimensions('Accounts Payable', 9);

View File

@ -105,4 +105,3 @@ frappe.query_reports["Accounts Payable Summary"] = {
}
erpnext.utils.add_dimensions('Accounts Payable Summary', 9);

View File

@ -12,4 +12,3 @@ def execute(filters=None):
"naming_by": ["Buying Settings", "supp_master_name"],
}
return AccountsReceivableSummary(filters).run(args)

View File

@ -200,4 +200,3 @@ frappe.query_reports["Accounts Receivable"] = {
}
erpnext.utils.add_dimensions('Accounts Receivable', 9);

View File

@ -93,4 +93,3 @@ def make_credit_note(docname):
cost_center = 'Main - _TC2',
is_return = 1,
return_against = docname)

View File

@ -92,4 +92,3 @@ frappe.query_reports["Budget Variance Report"] = {
erpnext.dimension_filters.forEach((dimension) => {
frappe.query_reports["Budget Variance Report"].filters[4].options.push(dimension["document_type"]);
});

View File

@ -399,4 +399,3 @@ def get_chart_data(filters, columns, data):
},
'type' : 'bar'
}

View File

@ -176,4 +176,3 @@ frappe.query_reports["General Ledger"] = {
}
erpnext.utils.add_dimensions('General Ledger', 15)

View File

@ -626,7 +626,3 @@ def add_sub_total_row(item, total_row_map, group_by_value, tax_columns):
for tax in tax_columns:
total_row.setdefault(frappe.scrub(tax + ' Amount'), 0.0)
total_row[frappe.scrub(tax + ' Amount')] += flt(item[frappe.scrub(tax + ' Amount')])

View File

@ -69,4 +69,3 @@ frappe.query_reports["Sales Register"] = {
}
erpnext.utils.add_dimensions('Sales Register', 7);

View File

@ -110,6 +110,3 @@ frappe.require("assets/erpnext/js/financial_statements.js", function() {
erpnext.utils.add_dimensions('Trial Balance', 6);
});

View File

@ -36,4 +36,3 @@ QUnit.test("test: Disease", function (assert) {
]);
});

View File

@ -10,4 +10,3 @@ frappe.listview_settings['Asset Repair'] = {
}
}
};

View File

@ -93,5 +93,3 @@ var loadAllStandings = function(frm) {
}
});
};

View File

@ -128,4 +128,3 @@ valid_scorecard = [
"weighting_function":"{total_score} * max( 0, min ( 1 , (12 - {period_number}) / 12) )"
}
]

View File

@ -109,4 +109,3 @@ def make_supplier_scorecard(source_name, target_doc=None):
}, target_doc, post_process, ignore_permissions=True)
return doc

View File

@ -268,4 +268,3 @@ def get_columns(filters):
])
return columns

View File

@ -102,4 +102,3 @@ def get_linked_material_requests(items):
mr_list.append(material_request)
return mr_list

View File

@ -344,4 +344,3 @@ def create_variant_doc_for_quick_entry(template, args):
variant.name = variant.item_code
validate_item_variant_attributes(variant, args)
return variant.as_dict()

View File

@ -235,4 +235,3 @@ def _get_employee_from_user(user):
# frappe.db.exists returns a tuple of a tuple
return frappe.get_doc('Employee', employee_docname[0][0])
return None

View File

@ -16,4 +16,3 @@ frappe.query_reports["Campaign Efficiency"] = {
}
]
};

View File

@ -20,5 +20,3 @@ frappe.query_reports["Lead Conversion Time"] = {
},
]
};

View File

@ -155,4 +155,3 @@ def get_conditions(filters) :
conditions.append(" and `tabLead`.status=%(status)s")
return " ".join(conditions) if conditions else ""

View File

@ -42,7 +42,3 @@ class AssessmentResult(Document):
"student":self.student, "assessment_plan":self.assessment_plan, "docstatus":("!=", 2)})
if assessment_result:
frappe.throw(_("Assessment Result record {0} already exists.").format(getlink("Assessment Result",assessment_result[0].name)))

View File

@ -16,4 +16,3 @@ class TestAssessmentResult(unittest.TestCase):
grade = get_grade("_Test Grading Scale", 70)
self.assertEqual("B", grade)

View File

@ -39,6 +39,3 @@ class TestCourseEnrollment(unittest.TestCase):
doc = frappe.get_doc("Program Enrollment", entry.name)
doc.cancel()
doc.delete()

View File

@ -47,4 +47,3 @@ class CourseSchedule(Document):
validate_overlap_for(self, "Assessment Plan", "room")
validate_overlap_for(self, "Assessment Plan", "supervisor", self.instructor)

View File

@ -174,4 +174,3 @@ def get_students(doctype, txt, searchfield, start, page_len, filters):
tuple(students + ["%%%s%%" % txt, start, page_len]
)
)

View File

@ -128,4 +128,3 @@ def fetch_students(doctype, txt, searchfield, start, page_len, filters):
order by idx desc, name
limit %s, %s""".format(searchfield),
tuple(["%%%s%%" % txt, "%%%s%%" % txt, start, page_len]))

View File

@ -121,4 +121,3 @@ def get_chart_data(data):
},
'type': 'bar'
}

View File

@ -1,3 +1,2 @@
// Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and contributors
// For license information, please see license.txt

View File

@ -188,4 +188,3 @@ frappe.tour['Clinical Procedure Template'] = [
description: __('You can also set the Medical Department for the template. After saving the document, an Item will automatically be created for billing this Clinical Procedure. You can then use this template while creating Clinical Procedures for Patients. Templates save you from filling up redundant data every single time. You can also create templates for other operations like Lab Tests, Therapy Sessions, etc.')
}
];

View File

@ -118,4 +118,3 @@ def change_item_code_from_template(item_code, doc):
rename_doc('Item', doc.item_code, item_code, ignore_permissions=True)
frappe.db.set_value('Clinical Procedure Template', doc.name, 'item_code', item_code)
return

View File

@ -12,4 +12,3 @@ class ExerciseType(Document):
self.name = ' - '.join(filter(None, [self.exercise_name, self.difficulty_level]))
else:
self.name = self.exercise_name

View File

@ -142,4 +142,3 @@ frappe.tour['Healthcare Practitioner'] = [
description: __('If this Healthcare Practitioner also works for the In-Patient Department, set the inpatient visit charge for this Practitioner.')
}
];

View File

@ -140,4 +140,3 @@ def create_ipme(filters, update_stock=0):
ipme = ipme.get_medication_orders()
return ipme

View File

@ -31,6 +31,3 @@ def create_patient_assessment(source_name, target_doc=None):
}, target_doc)
return doc

View File

@ -15,4 +15,3 @@ class VitalSigns(Document):
def set_title(self):
self.title = _('{0} on {1}').format(self.patient_name or self.patient,
frappe.utils.format_date(self.signs_date))[:100]

View File

@ -194,4 +194,3 @@ def get_date_range(time_span):
return time_span
except json.decoder.JSONDecodeError:
return get_timespan_date_range(time_span.lower())

View File

@ -55,4 +55,3 @@ QUnit.test("Test: Expense Claim [HR]", function (assert) {
() => done()
]);
});

View File

@ -27,4 +27,3 @@ QUnit.test("Test: Appraisal Template [HR]", function (assert) {
() => done()
]);
});

View File

@ -267,5 +267,3 @@ erpnext.EmployeeSelector = class EmployeeSelector {
mark_employee_toolbar.appendTo($(this.wrapper));
}
};

View File

@ -176,4 +176,3 @@ def time_diff_in_hours(start, end):
def find_index_in_dict(dict_list, key, value):
return next((index for (index, d) in enumerate(dict_list) if d[key] == value), None)

View File

@ -12,4 +12,3 @@ class EmployeeGrievance(Document):
bold("Invalid"),
bold("Resolved"))
)

View File

@ -48,4 +48,3 @@ def create_grievance_type():
grievance_type.save()
return grievance_type.name

View File

@ -57,4 +57,3 @@ def make_employee(source_name, target_doc=None):
}}
}, target_doc, set_missing_values)
return doc

View File

@ -70,4 +70,3 @@ def create_additional_salary(doc):
additional_salary.ref_docname = doc.name
return additional_salary

View File

@ -42,4 +42,3 @@ QUnit.test("Test: Expense Claim [HR]", function (assert) {
() => done()
]);
});

View File

@ -27,4 +27,3 @@ QUnit.test("Test: Expense Claim Type [HR]", function (assert) {
() => done()
]);
});

View File

@ -15,4 +15,3 @@ class HRSettings(Document):
from erpnext.setup.doctype.naming_series.naming_series import set_by_naming_series
set_by_naming_series("Employee", "employee_number",
self.get("emp_created_by")=="Naming Series", hide_name_field=True)

View File

@ -50,4 +50,3 @@ class JobApplicant(Document):
if names:
frappe.throw(_("Email Address must be unique, already exists for {0}").format(comma_and(names)), frappe.DuplicateEntryError)

View File

@ -26,4 +26,3 @@ QUnit.test("Test: Job Opening [HR]", function (assert) {
() => done()
]);
});

View File

@ -24,4 +24,3 @@ QUnit.test("Test: Job Opening [HR]", function (assert) {
() => done()
]);
});

View File

@ -99,5 +99,3 @@ class TestLeavePolicyAssignment(unittest.TestCase):
def tearDown(self):
for doctype in ["Leave Application", "Leave Allocation", "Leave Policy Assignment", "Leave Ledger Entry"]:
frappe.db.sql("delete from `tab{0}`".format(doctype)) #nosec

View File

@ -46,4 +46,3 @@ frappe.ui.form.on("Training Event Employee", {
frm.events.set_employee_query(frm);
}
});

View File

@ -49,4 +49,3 @@ QUnit.test("Test: Training Feedback [HR]", function (assert) {
() => done()
]);
});

View File

@ -42,4 +42,3 @@ class TrainingFeedback(Document):
if employee:
frappe.db.set_value("Training Event Employee", employee, "status", "Completed")

View File

@ -50,4 +50,3 @@ QUnit.test("Test: Training Result [HR]", function (assert) {
() => done()
]);
});

View File

@ -24,4 +24,3 @@ frappe.ui.form.on("Vehicle Log", {
});
}
});

View File

@ -38,4 +38,3 @@ frappe.query_reports["Employee Advance Summary"] = {
}
]
};

View File

@ -81,4 +81,3 @@ def get_chart_data(parameters,employees, filters):
}
chart["type"] = "donut"
return chart

View File

@ -49,4 +49,3 @@ frappe.query_reports["Vehicle Expenses"] = {
}
]
};

View File

@ -203,5 +203,3 @@ def get_disbursal_amount(loan, on_current_security_price=0):
disbursal_amount = loan_details.loan_amount - loan_details.disbursed_amount
return disbursal_amount

View File

@ -247,4 +247,3 @@ def get_per_day_interest(principal_amount, rate_of_interest, posting_date=None):
posting_date = getdate()
return flt((principal_amount * rate_of_interest) / (days_in_year(get_datetime(posting_date).year) * 100))

View File

@ -455,6 +455,3 @@ def calculate_amounts(against_loan, posting_date, payment_type=''):
amounts['payable_amount'] = amounts['payable_principal_amount'] + amounts['interest_amount']
return amounts

View File

@ -40,12 +40,3 @@ def get_loan_security_price(loan_security, valid_time=None):
frappe.throw(_("No valid Loan Security Price found for {0}").format(frappe.bold(loan_security)))
else:
return loan_security_price

View File

@ -122,4 +122,3 @@ def update_pending_shortfall(shortfall):
"shortfall_amount": 0,
"shortfall_percentage": 0
})

View File

@ -147,8 +147,3 @@ def get_pledged_security_qty(loan):
current_pledges[security] -= unpledges.get(security, 0.0)
return current_pledges

View File

@ -21,4 +21,3 @@ class LoanType(Document):
if self.get('loan_account') == self.get('payment_account'):
frappe.throw(_('Loan Account and Payment Account cannot be same'))

View File

@ -84,5 +84,3 @@ class LoanWriteOff(AccountsController):
)
make_gl_entries(gl_entries, cancel=cancel, merge_entries=False)

View File

@ -61,4 +61,3 @@ def term_loan_accrual_pending(date):
})
return pending_accrual

View File

@ -79,6 +79,3 @@ def get_company_wise_loan_security_details(filters, loan_security_details):
total_portfolio_value += flt(qty * loan_security_details.get(key[1], {}).get('latest_price', 0))
return security_wise_map, total_portfolio_value

View File

@ -163,4 +163,3 @@ erpnext.maintenance.MaintenanceSchedule = class MaintenanceSchedule extends frap
};
extend_cscript(cur_frm.cscript, new erpnext.maintenance.MaintenanceSchedule({frm: cur_frm}));

View File

@ -85,5 +85,3 @@ frappe.ui.form.on('Blanket Order', {
frm.trigger('set_tc_name_filter');
}
});

View File

@ -108,5 +108,3 @@ def get_columns(filters):
"fieldtype": "Int",
"width": 180
}]

View File

@ -139,7 +139,3 @@ def get_chart_data(periodic_data, columns):
chart["type"] = "line"
return chart

Some files were not shown because too many files have changed in this diff Show More