mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-31 10:49:09 +00:00
feat: enable automatic type annotations (#38452)
This commit is contained in:
@@ -7,4 +7,24 @@ from frappe.model.document import Document
|
||||
|
||||
|
||||
class CommunicationMedium(Document):
|
||||
# begin: auto-generated types
|
||||
# This code is auto-generated. Do not modify anything in this block.
|
||||
|
||||
from typing import TYPE_CHECKING
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from frappe.types import DF
|
||||
|
||||
from erpnext.communication.doctype.communication_medium_timeslot.communication_medium_timeslot import (
|
||||
CommunicationMediumTimeslot,
|
||||
)
|
||||
|
||||
catch_all: DF.Link | None
|
||||
communication_channel: DF.Literal
|
||||
communication_medium_type: DF.Literal["Voice", "Email", "Chat"]
|
||||
disabled: DF.Check
|
||||
provider: DF.Link | None
|
||||
timeslots: DF.Table[CommunicationMediumTimeslot]
|
||||
# end: auto-generated types
|
||||
|
||||
pass
|
||||
|
||||
@@ -7,4 +7,23 @@ from frappe.model.document import Document
|
||||
|
||||
|
||||
class CommunicationMediumTimeslot(Document):
|
||||
# begin: auto-generated types
|
||||
# This code is auto-generated. Do not modify anything in this block.
|
||||
|
||||
from typing import TYPE_CHECKING
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from frappe.types import DF
|
||||
|
||||
day_of_week: DF.Literal[
|
||||
"Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday"
|
||||
]
|
||||
employee_group: DF.Link
|
||||
from_time: DF.Time
|
||||
parent: DF.Data
|
||||
parentfield: DF.Data
|
||||
parenttype: DF.Data
|
||||
to_time: DF.Time
|
||||
# end: auto-generated types
|
||||
|
||||
pass
|
||||
|
||||
Reference in New Issue
Block a user