mirror of
https://github.com/frappe/erpnext.git
synced 2026-06-01 19:29:10 +00:00
chore: Cleanup imports (#27320)
* chore: Added isort to pre-commit config * chore: Sort imports with isort * chore: Remove imports with pycln * chore: Sort imports with isort * chore: Fix import issues * chore: Fix sider issues * chore: linting * chore: linting / sorting import from ecommerce refactor merge * ci: dont allow unused imports * chore: sort / clean ecommerce imports Co-authored-by: Ankush Menat <ankush@iwebnotes.com>
This commit is contained in:
@@ -3,9 +3,11 @@
|
||||
# For license information, please see license.txt
|
||||
|
||||
from __future__ import unicode_literals
|
||||
|
||||
import frappe
|
||||
from frappe.model.document import Document
|
||||
|
||||
|
||||
class HotelRoom(Document):
|
||||
def validate(self):
|
||||
if not self.capacity:
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
# See license.txt
|
||||
from __future__ import unicode_literals
|
||||
|
||||
import frappe
|
||||
import unittest
|
||||
|
||||
test_dependencies = ["Hotel Room Package"]
|
||||
test_records = [
|
||||
dict(doctype="Hotel Room", name="1001",
|
||||
|
||||
@@ -3,8 +3,9 @@
|
||||
# For license information, please see license.txt
|
||||
|
||||
from __future__ import unicode_literals
|
||||
import frappe
|
||||
|
||||
from frappe.model.document import Document
|
||||
|
||||
|
||||
class HotelRoomAmenity(Document):
|
||||
pass
|
||||
|
||||
@@ -3,9 +3,11 @@
|
||||
# For license information, please see license.txt
|
||||
|
||||
from __future__ import unicode_literals
|
||||
|
||||
import frappe
|
||||
from frappe.model.document import Document
|
||||
|
||||
|
||||
class HotelRoomPackage(Document):
|
||||
def validate(self):
|
||||
if not self.item:
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
# See license.txt
|
||||
from __future__ import unicode_literals
|
||||
|
||||
import frappe
|
||||
import unittest
|
||||
|
||||
test_records = [
|
||||
dict(doctype='Item', item_code='Breakfast',
|
||||
item_group='Products', is_stock_item=0),
|
||||
|
||||
@@ -3,8 +3,9 @@
|
||||
# For license information, please see license.txt
|
||||
|
||||
from __future__ import unicode_literals
|
||||
import frappe
|
||||
|
||||
from frappe.model.document import Document
|
||||
|
||||
|
||||
class HotelRoomPricing(Document):
|
||||
pass
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
# See license.txt
|
||||
from __future__ import unicode_literals
|
||||
|
||||
import frappe
|
||||
import unittest
|
||||
|
||||
test_dependencies = ["Hotel Room Package"]
|
||||
test_records = [
|
||||
dict(doctype="Hotel Room Pricing", enabled=1,
|
||||
|
||||
@@ -3,8 +3,9 @@
|
||||
# For license information, please see license.txt
|
||||
|
||||
from __future__ import unicode_literals
|
||||
import frappe
|
||||
|
||||
from frappe.model.document import Document
|
||||
|
||||
|
||||
class HotelRoomPricingItem(Document):
|
||||
pass
|
||||
|
||||
@@ -3,8 +3,9 @@
|
||||
# For license information, please see license.txt
|
||||
|
||||
from __future__ import unicode_literals
|
||||
import frappe
|
||||
|
||||
from frappe.model.document import Document
|
||||
|
||||
|
||||
class HotelRoomPricingPackage(Document):
|
||||
pass
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
# See license.txt
|
||||
from __future__ import unicode_literals
|
||||
|
||||
import frappe
|
||||
import unittest
|
||||
|
||||
|
||||
class TestHotelRoomPricingPackage(unittest.TestCase):
|
||||
pass
|
||||
|
||||
@@ -3,10 +3,14 @@
|
||||
# For license information, please see license.txt
|
||||
|
||||
from __future__ import unicode_literals
|
||||
import frappe, json
|
||||
from frappe.model.document import Document
|
||||
|
||||
import json
|
||||
|
||||
import frappe
|
||||
from frappe import _
|
||||
from frappe.utils import date_diff, add_days, flt
|
||||
from frappe.model.document import Document
|
||||
from frappe.utils import add_days, date_diff, flt
|
||||
|
||||
|
||||
class HotelRoomUnavailableError(frappe.ValidationError): pass
|
||||
class HotelRoomPricingNotSetError(frappe.ValidationError): pass
|
||||
|
||||
@@ -3,9 +3,15 @@
|
||||
# See license.txt
|
||||
from __future__ import unicode_literals
|
||||
|
||||
import frappe
|
||||
import unittest
|
||||
from erpnext.hotels.doctype.hotel_room_reservation.hotel_room_reservation import HotelRoomPricingNotSetError, HotelRoomUnavailableError
|
||||
|
||||
import frappe
|
||||
|
||||
from erpnext.hotels.doctype.hotel_room_reservation.hotel_room_reservation import (
|
||||
HotelRoomPricingNotSetError,
|
||||
HotelRoomUnavailableError,
|
||||
)
|
||||
|
||||
test_dependencies = ["Hotel Room Package", "Hotel Room Pricing", "Hotel Room"]
|
||||
|
||||
class TestHotelRoomReservation(unittest.TestCase):
|
||||
|
||||
@@ -3,8 +3,9 @@
|
||||
# For license information, please see license.txt
|
||||
|
||||
from __future__ import unicode_literals
|
||||
import frappe
|
||||
|
||||
from frappe.model.document import Document
|
||||
|
||||
|
||||
class HotelRoomReservationItem(Document):
|
||||
pass
|
||||
|
||||
@@ -3,8 +3,9 @@
|
||||
# For license information, please see license.txt
|
||||
|
||||
from __future__ import unicode_literals
|
||||
import frappe
|
||||
|
||||
from frappe.model.document import Document
|
||||
|
||||
|
||||
class HotelRoomType(Document):
|
||||
pass
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
# See license.txt
|
||||
from __future__ import unicode_literals
|
||||
|
||||
import frappe
|
||||
import unittest
|
||||
|
||||
|
||||
class TestHotelRoomType(unittest.TestCase):
|
||||
pass
|
||||
|
||||
@@ -3,8 +3,9 @@
|
||||
# For license information, please see license.txt
|
||||
|
||||
from __future__ import unicode_literals
|
||||
import frappe
|
||||
|
||||
from frappe.model.document import Document
|
||||
|
||||
|
||||
class HotelSettings(Document):
|
||||
pass
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
# See license.txt
|
||||
from __future__ import unicode_literals
|
||||
|
||||
import frappe
|
||||
import unittest
|
||||
|
||||
|
||||
class TestHotelSettings(unittest.TestCase):
|
||||
pass
|
||||
|
||||
@@ -2,12 +2,14 @@
|
||||
# For license information, please see license.txt
|
||||
|
||||
from __future__ import unicode_literals
|
||||
|
||||
import frappe
|
||||
from frappe import _
|
||||
from frappe.utils import add_days, date_diff
|
||||
|
||||
from erpnext.hotels.doctype.hotel_room_reservation.hotel_room_reservation import get_rooms_booked
|
||||
|
||||
|
||||
def execute(filters=None):
|
||||
columns = get_columns(filters)
|
||||
data = get_data(filters)
|
||||
|
||||
Reference in New Issue
Block a user