chore: whitespace cleanup from codebase

This commit is contained in:
Ankush Menat
2021-08-19 14:33:03 +05:30
parent e536f6d13f
commit 9bb69e711a
1218 changed files with 1391 additions and 1643 deletions

View File

@@ -52,4 +52,4 @@ erpnext.crop.update_item_qty_amount = function(frm, cdt, cdn) {
}
});
});
};
};

View File

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

View File

@@ -105,7 +105,7 @@ QUnit.test("test: Crop", function (assert) {
]
]}
]),
// agriculture task list
// agriculture task list
() => {
assert.equal(cur_frm.doc.name, 'Basil from seed');
assert.equal(cur_frm.doc.period, 15);

View File

@@ -11,4 +11,4 @@ test_dependencies = ["Fertilizer"]
class TestCrop(unittest.TestCase):
def test_crop_period(self):
basil = frappe.get_doc('Crop', 'Basil from seed')
self.assertEqual(basil.period, 15)
self.assertEqual(basil.period, 15)

View File

@@ -19,7 +19,7 @@ QUnit.test("test: Crop Cycle", function (assert) {
{disease: 'Aphids'}
]
]},
{linked_land_unit: [
{linked_land_unit: [
[
{land_unit: 'Basil Farm'}
]

View File

@@ -17,4 +17,4 @@ class Disease(Document):
frappe.throw(_("Start day is greater than end day in task '{0}'").format(task.task_name))
# to calculate the period of the Crop Cycle
if task.end_day > max_period: max_period = task.end_day
self.treatment_period = max_period
self.treatment_period = max_period

View File

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

View File

@@ -9,4 +9,4 @@ import unittest
class TestDisease(unittest.TestCase):
def test_treatment_period(self):
disease = frappe.get_doc('Disease', 'Aphids')
self.assertEqual(disease.treatment_period, 3)
self.assertEqual(disease.treatment_period, 3)

View File

@@ -11,4 +11,4 @@ class Fertilizer(Document):
def load_contents(self):
docs = frappe.get_all("Agriculture Analysis Criteria", filters={'linked_doctype':'Fertilizer'})
for doc in docs:
self.append('fertilizer_contents', {'title': str(doc.name)})
self.append('fertilizer_contents', {'title': str(doc.name)})

View File

@@ -8,4 +8,4 @@ import unittest
class TestFertilizer(unittest.TestCase):
def test_fertilizer_creation(self):
self.assertEqual(frappe.db.exists('Fertilizer', 'Urea'), 'Urea')
self.assertEqual(frappe.db.exists('Fertilizer', 'Urea'), 'Urea')

View File

@@ -12,4 +12,4 @@ class PlantAnalysis(Document):
def load_contents(self):
docs = frappe.get_all("Agriculture Analysis Criteria", filters={'linked_doctype':'Plant Analysis'})
for doc in docs:
self.append('plant_analysis_criteria', {'title': str(doc.name)})
self.append('plant_analysis_criteria', {'title': str(doc.name)})

View File

@@ -11,4 +11,4 @@ class SoilAnalysis(Document):
def load_contents(self):
docs = frappe.get_all("Agriculture Analysis Criteria", filters={'linked_doctype':'Soil Analysis'})
for doc in docs:
self.append('soil_analysis_criteria', {'title': str(doc.name)})
self.append('soil_analysis_criteria', {'title': str(doc.name)})

View File

@@ -11,4 +11,4 @@ class TestSoilTexture(unittest.TestCase):
soil_tex = frappe.get_all('Soil Texture', fields=['name'], filters={'collection_datetime': '2017-11-08'})
doc = frappe.get_doc('Soil Texture', soil_tex[0].name)
self.assertEqual(doc.silt_composition, 50)
self.assertEqual(doc.soil_type, 'Silt Loam')
self.assertEqual(doc.soil_type, 'Silt Loam')

View File

@@ -24,4 +24,4 @@ class WaterAnalysis(Document):
if self.collection_datetime > self.laboratory_testing_datetime:
frappe.throw(_('Lab testing datetime cannot be before collection datetime'))
if self.laboratory_testing_datetime > self.result_datetime:
frappe.throw(_('Lab result datetime cannot be before testing datetime'))
frappe.throw(_('Lab result datetime cannot be before testing datetime'))

View File

@@ -426,5 +426,5 @@ def create_agriculture_data():
title='Degree Days',
standard=1,
linked_doctype='Weather')
]
]
insert_record(records)