fix: User Literal from typing_extensions as its not supported in typing in py 3.7

- https://mypy.readthedocs.io/en/stable/literal_types.html
This commit is contained in:
marination
2022-04-05 18:36:18 +05:30
parent e8f3e23008
commit ec646a1a44
2 changed files with 5 additions and 2 deletions

View File

@@ -1,11 +1,12 @@
# Copyright (c) 2022, Frappe Technologies Pvt. Ltd. and contributors
# For license information, please see license.txt
from typing import Dict, List, Literal, Optional
from typing import Dict, List, Optional
import frappe
from frappe import _
from frappe.model.document import Document
from frappe.utils import cstr, flt
from typing_extensions import Literal
from erpnext.manufacturing.doctype.bom_update_tool.bom_update_tool import update_cost

View File

@@ -2,7 +2,9 @@
# For license information, please see license.txt
import json
from typing import TYPE_CHECKING, Dict, Literal, Optional, Union
from typing import TYPE_CHECKING, Dict, Optional, Union
from typing_extensions import Literal
if TYPE_CHECKING:
from erpnext.manufacturing.doctype.bom_update_log.bom_update_log import BOMUpdateLog