mirror of
https://github.com/langgenius/dify.git
synced 2024-11-16 11:42:29 +08:00
fix: minor bugs and typos
This commit is contained in:
parent
33ead9f459
commit
ceb444bd22
|
@ -1,3 +0,0 @@
|
|||
# Used to mark a position as excluded.
|
||||
# See api/core/helper/position_helper.py for more details.
|
||||
POSITION_EXCLUDED = -999
|
|
@ -76,7 +76,7 @@ def is_filtered(
|
|||
exclude_set: set[str],
|
||||
data: Any,
|
||||
name_func: Callable[[Any], str],
|
||||
) -> list[Any]:
|
||||
) -> bool:
|
||||
"""
|
||||
Chcek if the object should be filtered out.
|
||||
:param include_set: the set of names to be included
|
||||
|
|
|
@ -402,7 +402,7 @@ class ToolManager:
|
|||
db_builtin_providers: list[BuiltinToolProvider] = db.session.query(BuiltinToolProvider). \
|
||||
filter(BuiltinToolProvider.tenant_id == tenant_id).all()
|
||||
|
||||
def find_db_builtin_provider(provider): return next(
|
||||
find_db_builtin_provider = lambda provider: next(
|
||||
(x for x in db_builtin_providers if x.provider == provider),
|
||||
None
|
||||
)
|
||||
|
|
|
@ -198,7 +198,7 @@ class BuiltinToolManageService:
|
|||
).all() or []
|
||||
|
||||
# find provider
|
||||
def find_provider(provider): return next(filter(lambda db_provider: db_provider.provider == provider, db_providers), None)
|
||||
find_provider = lambda provider: next(filter(lambda db_provider: db_provider.provider == provider, db_providers), None)
|
||||
|
||||
result: list[UserToolProvider] = []
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user