chore: mass trailing whitespace and EOF fixes

This commit is contained in:
Ankush Menat
2021-08-19 13:41:10 +05:30
parent 869e36c33a
commit 4551d7d602
1190 changed files with 1352 additions and 1604 deletions

View File

@@ -15,7 +15,7 @@ frappe.ui.form.on('Appraisal', {
frm.set_value('status', 'Draft');
}
},
kra_template: function(frm) {
frm.doc.goals = [];
erpnext.utils.map_current_doc({

View File

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

View File

@@ -7,4 +7,4 @@ import frappe
from frappe.model.document import Document
class AppraisalGoal(Document):
pass
pass

View File

@@ -9,4 +9,4 @@ def get_data():
'items': ['Appraisal']
},
],
}
}

View File

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

View File

@@ -7,4 +7,4 @@ import frappe
from frappe.model.document import Document
class AppraisalTemplateGoal(Document):
pass
pass

View File

@@ -9,4 +9,4 @@ frappe.views.calendar["Attendance"] = {
}
},
get_events_method: "erpnext.hr.doctype.attendance.attendance.get_events"
};
};

View File

@@ -36,4 +36,4 @@ QUnit.test("Test: Attendance [HR]", function (assert) {
"attendance for Present day is marked"),
() => done()
]);
});
});

View File

@@ -8,4 +8,4 @@ def get_data():
'items': ['Attendance']
}
]
}
}

View File

@@ -7,4 +7,4 @@ import frappe
from frappe.model.document import Document
class Branch(Document):
pass
pass

View File

@@ -20,4 +20,4 @@ QUnit.test("Test: Branch [HR]", function (assert) {
'name of branch correctly saved'),
() => done()
]);
});
});

View File

@@ -4,4 +4,4 @@ from __future__ import unicode_literals
import frappe
test_records = frappe.get_test_records('Branch')
test_records = frappe.get_test_records('Branch')

View File

@@ -20,4 +20,4 @@ QUnit.test("test: Daily Work Summary", function (assert) {
() => done()
]);
});
});

View File

@@ -25,4 +25,4 @@ frappe.treeview_settings["Department"] = {
onload: function(treeview) {
treeview.make_tree();
}
};
};

View File

@@ -20,4 +20,4 @@ QUnit.test("Test: Department [HR]", function (assert) {
'name of department correctly saved'),
() => done()
]);
});
});

View File

@@ -21,4 +21,4 @@ def create_department(department_name, parent_department=None):
return doc
test_records = frappe.get_test_records('Department')
test_records = frappe.get_test_records('Department')

View File

@@ -7,4 +7,4 @@ import frappe
from frappe.model.document import Document
class Designation(Document):
pass
pass

View File

@@ -20,4 +20,4 @@ QUnit.test("Test: Designation [HR]", function (assert) {
'name of designation correctly saved'),
() => done()
]);
});
});

View File

@@ -17,4 +17,4 @@ def create_designation(**args):
"description": args.description or "_Test description"
})
designation.save()
return designation
return designation

View File

@@ -520,4 +520,4 @@ def has_upload_permission(doc, ptype='read', user=None):
user = frappe.session.user
if get_doc_permissions(doc, user=user, ptype=ptype).get(ptype):
return True
return doc.user_id == user
return doc.user_id == user

View File

@@ -33,4 +33,4 @@ frappe.treeview_settings['Employee'] = {
condition: 'frappe.boot.user.can_create.indexOf("Employee") !== -1'
}
],
};
};

View File

@@ -37,4 +37,4 @@ QUnit.test("Test: Employee [HR]", function (assert) {
() => frappe.timeout(10),
() => done()
]);
});
});

View File

@@ -48,4 +48,4 @@ def make_employee_advance(employee_name):
doc.insert()
doc.submit()
return doc
return doc

View File

@@ -18,4 +18,4 @@
.checkbox{
margin-top: -3px;
}
}

View File

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

View File

@@ -58,4 +58,4 @@ QUnit.test("Test: Employee attendance tool [HR]", function (assert) {
},
() => done()
]);
});
});

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

@@ -42,11 +42,11 @@ class TestEmployeeCheckin(unittest.TestCase):
self.assertEqual(logs_count, 4)
attendance_count = frappe.db.count('Attendance', {'status':'Present', 'working_hours':8.2,
'employee':employee, 'attendance_date':now_date})
self.assertEqual(attendance_count, 1)
self.assertEqual(attendance_count, 1)
def test_calculate_working_hours(self):
check_in_out_type = ['Alternating entries as IN and OUT during the same shift',
'Strictly based on Log Type in Employee Checkin']
'Strictly based on Log Type in Employee Checkin']
working_hours_calc_type = ['First Check-in and Last Check-out',
'Every Valid Check-in and Check-out']
logs_type_1 = [

View File

@@ -7,4 +7,4 @@ import frappe
from frappe.model.document import Document
class EmployeeEducation(Document):
pass
pass

View File

@@ -7,4 +7,4 @@ import frappe
from frappe.model.document import Document
class EmployeeExternalWorkHistory(Document):
pass
pass

View File

@@ -10,4 +10,4 @@ def get_data():
'items': ['Employee Onboarding Template', 'Employee Separation Template']
}
]
}
}

View File

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

View File

@@ -9,4 +9,4 @@ frappe.listview_settings["Employee Grievance"] = {
};
return [__(doc.status), colors[doc.status], "status,=," + doc.status];
}
};
};

View File

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

View File

@@ -29,4 +29,4 @@ def make_employee_group():
def get_employee_group():
employee_group = frappe.db.exists("Employee Group", "_Test Employee Group")
return employee_group
return employee_group

View File

@@ -7,4 +7,4 @@ import frappe
from frappe.model.document import Document
class EmployeeInternalWorkHistory(Document):
pass
pass

View File

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

View File

@@ -101,4 +101,4 @@ def create_employee_onboarding():
onboarding.insert()
onboarding.submit()
return onboarding
return onboarding

View File

@@ -9,4 +9,4 @@ def get_data():
'items': ['Employee Onboarding']
},
],
}
}

View File

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

View File

@@ -12,4 +12,4 @@ def get_data():
},
]
}
}

View File

@@ -11,4 +11,4 @@ frappe.listview_settings['Employee Referral'] = {
return [__(doc.status), "red", "status,=," + doc.status];
}
},
};
};

View File

@@ -57,4 +57,4 @@ def create_employee_referral():
emp_ref.save()
emp_ref.submit()
return emp_ref
return emp_ref

View File

@@ -45,4 +45,4 @@ def create_employee_separation():
separation.boarding_status = 'Pending'
separation.insert()
separation.submit()
return separation
return separation

View File

@@ -9,4 +9,4 @@ def get_data():
'items': ['Employee Separation']
},
],
}
}

View File

@@ -7,4 +7,4 @@ import frappe
from frappe.model.document import Document
class EmploymentType(Document):
pass
pass

View File

@@ -19,4 +19,4 @@ QUnit.test("Test: Employment type [HR]", function (assert) {
'name of employment type correctly saved'),
() => done()
]);
});
});

View File

@@ -4,4 +4,4 @@ from __future__ import unicode_literals
import frappe
test_records = frappe.get_test_records('Employment Type')
test_records = frappe.get_test_records('Employment Type')

View File

@@ -442,4 +442,4 @@ frappe.ui.form.on("Expense Taxes and Charges", {
tax_amount: function(frm, cdt, cdn) {
frm.trigger("calculate_total_tax", cdt, cdn);
}
});
});

View File

@@ -17,4 +17,4 @@ def get_data():
'items': ['Employee Advance']
},
]
}
}

View File

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

View File

@@ -72,7 +72,7 @@ class TestExpenseClaim(unittest.TestCase):
def test_expense_claim_gl_entry(self):
payable_account = get_payable_account(company_name)
taxes = generate_taxes()
expense_claim = make_expense_claim(payable_account, 300, 200, company_name, "Travel Expenses - _TC4",
expense_claim = make_expense_claim(payable_account, 300, 200, company_name, "Travel Expenses - _TC4",
do_not_submit=True, taxes=taxes)
expense_claim.submit()

View File

@@ -7,4 +7,4 @@ import frappe
from frappe.model.document import Document
class ExpenseClaimDetail(Document):
pass
pass

View File

@@ -25,4 +25,4 @@ class ExpenseClaimType(Document):
"""Error when Company of Ledger account doesn't match with Company Selected"""
if frappe.db.get_value("Account", entry.default_account, "company") != entry.company:
frappe.throw(_("Account {0} does not match with Company {1}"
).format(entry.default_account, entry.company))
).format(entry.default_account, entry.company))

View File

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

View File

@@ -7,4 +7,4 @@ import frappe
from frappe.model.document import Document
class Holiday(Document):
pass
pass

View File

@@ -18,4 +18,4 @@ def get_data():
'items': ['Service Level', 'Service Level Agreement']
}
]
}
}

View File

@@ -39,4 +39,4 @@ QUnit.test("Test: Holiday list [HR]", function (assert) {
},
() => done()
]);
});
});

View File

@@ -5,4 +5,4 @@ frappe.ui.form.on('HR Settings', {
restrict_backdated_leave_application: function(frm) {
frm.toggle_reqd("role_allowed_to_create_backdated_leave_application", frm.doc.restrict_backdated_leave_application);
}
});
});

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

@@ -38,4 +38,4 @@ frappe.ui.form.on("Job Applicant", {
});
}
});
});

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

@@ -12,4 +12,4 @@ def get_data():
'items': ['Job Offer']
},
],
}
}

View File

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

View File

@@ -48,4 +48,4 @@ QUnit.test("Test: Job Offer [HR]", function (assert) {
() => frappe.timeout(2),
() => done()
]);
});
});

View File

@@ -79,4 +79,4 @@ def create_staffing_plan(**args):
})
staffing_plan.insert()
staffing_plan.submit()
return staffing_plan
return staffing_plan

View File

@@ -9,4 +9,4 @@ def get_data():
'items': ['Job Applicant']
}
],
}
}

View File

@@ -1,16 +1,16 @@
<div class="my-5">
<h3>{{ doc.job_title }}</h3>
<p>{{ doc.description }}</p>
{%- if doc.publish_salary_range -%}
{%- if doc.publish_salary_range -%}
<p><b>{{_("Salary range per month")}}: </b>{{ frappe.format_value(frappe.utils.flt(doc.lower_range), currency=doc.currency) }} - {{ frappe.format_value(frappe.utils.flt(doc.upper_range), currency=doc.currency) }}</p>
{% endif %}
<div>
{%- if doc.job_application_route -%}
<a class='btn btn-primary'
<a class='btn btn-primary'
href='/{{doc.job_application_route}}?new=1&job_title={{ doc.name }}'>
{{ _("Apply Now") }}</a>
{% else %}
<a class='btn btn-primary'
<a class='btn btn-primary'
href='/job_application?new=1&job_title={{ doc.name }}'>
{{ _("Apply Now") }}</a>
{% endif %}

View File

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

View File

@@ -100,4 +100,4 @@ frappe.ui.form.on("Leave Allocation", {
frm.set_value("total_leaves_allocated", flt(frm.doc.new_leaves_allocated));
}
}
});
});

View File

@@ -17,4 +17,4 @@ def get_data():
'items': ['Employee Leave Balance']
}
]
}
}

View File

@@ -38,4 +38,4 @@ QUnit.test("Test: Leave allocation [HR]", function (assert) {
"total leave calculation is correctly set"),
() => done()
]);
});
});

View File

@@ -17,4 +17,4 @@ frappe.views.calendar["Leave Application"] = {
}
},
get_events_method: "erpnext.hr.doctype.leave_application.leave_application.get_events"
}
}

View File

@@ -17,4 +17,4 @@ def get_data():
'items': ['Employee Leave Balance']
}
]
}
}

View File

@@ -21,5 +21,5 @@
<tr>
<td>Status</td>
<td>{{status}}</td>
</tr>
</tr>
</table>

View File

@@ -39,4 +39,4 @@ QUnit.test("Test: Leave application [HR]", function (assert) {
// "leave for correct employee is submitted"),
() => done()
]);
});
});

View File

@@ -8,4 +8,4 @@ def get_data():
'items': ['Department']
}
]
}
}

View File

@@ -24,4 +24,4 @@ QUnit.test("Test: Leave block list [HR]", function (assert) {
'name of blocked leave list correctly saved'),
() => done()
]);
});
});

View File

@@ -9,4 +9,4 @@ import frappe
from frappe.model.document import Document
class LeaveBlockListAllow(Document):
pass
pass

View File

@@ -9,4 +9,4 @@ import frappe
from frappe.model.document import Document
class LeaveBlockListDate(Document):
pass
pass

View File

@@ -21,4 +21,4 @@ frappe.ui.form.on("Leave Control Panel", {
});
}
}
});
});

View File

@@ -47,4 +47,4 @@ QUnit.test("Test: Leave control panel [HR]", function (assert) {
},
() => done()
]);
});
});

View File

@@ -134,4 +134,4 @@ def create_leave_encashment(leave_allocation):
leave_type=allocation.leave_type,
encashment_date=allocation.to_date
))
leave_encashment.insert(ignore_permissions=True)
leave_encashment.insert(ignore_permissions=True)

View File

@@ -185,4 +185,4 @@ def expire_carried_forward_allocation(allocation):
from_date=allocation.to_date,
to_date=allocation.to_date
)
create_leave_ledger_entry(allocation, args)
create_leave_ledger_entry(allocation, args)

View File

@@ -10,4 +10,4 @@ def get_data():
'items': ['Leave Allocation']
}
]
}
}

View File

@@ -27,4 +27,4 @@ def create_leave_period(from_date, to_date, company=None):
"to_date": to_date,
"is_active": 1
}).insert()
return leave_period
return leave_period

View File

@@ -10,4 +10,4 @@ def get_data():
'items': ['Leave Policy Assignment', 'Leave Allocation']
},
]
}
}

View File

@@ -28,4 +28,4 @@ def create_leave_policy(**args):
"leave_type": args.leave_type or "_Test Leave Type",
"annual_allocation": args.annual_allocation or 10
}]
})
})

View File

@@ -10,4 +10,4 @@ def get_data():
'items': ['Leave Allocation']
},
]
}
}

View File

@@ -105,4 +105,4 @@ frappe.listview_settings['Leave Policy Assignment'] = {
});
}
}
};
};

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

@@ -11,4 +11,4 @@ def get_data():
'items': ['Attendance', 'Leave Encashment']
}
]
}
}

View File

@@ -19,4 +19,4 @@ QUnit.test("Test: Leave type [HR]", function (assert) {
'leave type correctly saved'),
() => done()
]);
});
});

View File

@@ -28,4 +28,4 @@ def create_leave_type(**args):
if leave_type.is_ppl:
leave_type.fraction_of_daily_salary_per_leave = args.fraction_of_daily_salary_per_leave or 0.5
return leave_type
return leave_type

View File

@@ -10,4 +10,4 @@ frappe.views.calendar["Shift Assignment"] = {
"allDay": "allDay",
},
get_events_method: "erpnext.hr.doctype.shift_assignment.shift_assignment.get_events"
}
}

View File

@@ -77,4 +77,4 @@ class TestShiftAssignment(unittest.TestCase):
"status": 'Active'
})
self.assertRaises(frappe.ValidationError, shift_assignment_3.save)
self.assertRaises(frappe.ValidationError, shift_assignment_3.save)

View File

@@ -94,4 +94,4 @@ class ShiftRequest(Document):
msg = _("Employee {0} has already applied for {1} between {2} and {3} : ").format(self.employee,
d['shift_type'], formatdate(d['from_date']), formatdate(d['to_date'])) \
+ """ <b><a href="/app/Form/Shift Request/{0}">{0}</a></b>""".format(d["name"])
frappe.throw(msg, OverlapError)
frappe.throw(msg, OverlapError)

View File

@@ -9,4 +9,4 @@ def get_data():
'items': ['Shift Assignment']
},
],
}
}

View File

@@ -106,4 +106,4 @@ def make_shift_request(approver, do_not_submit=0):
return shift_request
shift_request.submit()
return shift_request
return shift_request

View File

@@ -9,4 +9,4 @@ def get_data():
'items': ['Job Opening']
}
],
}
}

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