Fix: Replace seq function with custom implementation to avoid dependency errors
parent
388d436cbc
commit
27674fe46a
|
|
@ -6,7 +6,6 @@ req_file = os.path.join(os.path.dirname(os.path.realpath(__file__)), "requiremen
|
|||
|
||||
def dist2package(dist: str):
|
||||
return ({
|
||||
"pyfunctional": "functional",
|
||||
"python-dotenv": "dotenv",
|
||||
"Pillow": "PIL"
|
||||
}).get(dist, dist)
|
||||
|
|
|
|||
|
|
@ -2,5 +2,4 @@ fastapi
|
|||
uvicorn
|
||||
piexif
|
||||
python-dotenv
|
||||
Pillow
|
||||
pyfunctional
|
||||
Pillow
|
||||
|
|
@ -50,7 +50,7 @@ from scripts.iib.db.datamodel import (
|
|||
)
|
||||
from scripts.iib.db.update_image_data import update_image_data, rebuild_image_index
|
||||
from scripts.iib.logger import logger
|
||||
from functional import seq
|
||||
from scripts.iib.seq import seq
|
||||
import urllib.parse
|
||||
|
||||
index_html_path = os.path.join(cwd, "vue/dist/index.html") # 在app.py也被使用
|
||||
|
|
|
|||
|
|
@ -0,0 +1,21 @@
|
|||
class Seq:
|
||||
def __init__(self, iterable):
|
||||
self.iterable = iterable
|
||||
|
||||
def map(self, func):
|
||||
return Seq(func(item) for item in self.iterable)
|
||||
|
||||
def filter(self, predicate):
|
||||
return Seq(item for item in self.iterable if predicate(item))
|
||||
|
||||
def to_list(self):
|
||||
return list(self.iterable)
|
||||
|
||||
def __iter__(self):
|
||||
return iter(self.iterable)
|
||||
|
||||
def __repr__(self):
|
||||
return f"Seq({repr(self.iterable)})"
|
||||
|
||||
def seq(iterable):
|
||||
return Seq(iterable)
|
||||
|
|
@ -14,15 +14,12 @@ declare module '@vue/runtime-core' {
|
|||
ABreadcrumbItem: typeof import('ant-design-vue/es')['BreadcrumbItem']
|
||||
AButton: typeof import('ant-design-vue/es')['Button']
|
||||
ACheckbox: typeof import('ant-design-vue/es')['Checkbox']
|
||||
ACollapse: typeof import('ant-design-vue/es')['Collapse']
|
||||
ACollapsePanel: typeof import('ant-design-vue/es')['CollapsePanel']
|
||||
ADrawer: typeof import('ant-design-vue/es')['Drawer']
|
||||
ADropdown: typeof import('ant-design-vue/es')['Dropdown']
|
||||
AForm: typeof import('ant-design-vue/es')['Form']
|
||||
AFormItem: typeof import('ant-design-vue/es')['FormItem']
|
||||
AImage: typeof import('ant-design-vue/es')['Image']
|
||||
AInput: typeof import('ant-design-vue/es')['Input']
|
||||
AInputGroup: typeof import('ant-design-vue/es')['InputGroup']
|
||||
AInputNumber: typeof import('ant-design-vue/es')['InputNumber']
|
||||
AMenu: typeof import('ant-design-vue/es')['Menu']
|
||||
AMenuDivider: typeof import('ant-design-vue/es')['MenuDivider']
|
||||
|
|
@ -39,7 +36,6 @@ declare module '@vue/runtime-core' {
|
|||
ATabPane: typeof import('ant-design-vue/es')['TabPane']
|
||||
ATabs: typeof import('ant-design-vue/es')['Tabs']
|
||||
ATag: typeof import('ant-design-vue/es')['Tag']
|
||||
ATextarea: typeof import('ant-design-vue/es')['Textarea']
|
||||
ATooltip: typeof import('ant-design-vue/es')['Tooltip']
|
||||
BaseFileListInfo: typeof import('./src/components/BaseFileListInfo.vue')['default']
|
||||
ContextMenu: typeof import('./src/components/ContextMenu.vue')['default']
|
||||
|
|
|
|||
Loading…
Reference in New Issue