浏览代码

Warning instead of exception on type mismatch (#3523)

### What problem does this PR solve?

Warning instead of exception on type mismatch.

### Type of change

- [x] Bug Fix (non-breaking change which fixes an issue)
tags/v0.14.0
Zhichang Yu 11 个月前
父节点
当前提交
6be7901df2
共有 2 个文件被更改,包括 6 次插入4 次删除
  1. 3
    2
      api/ragflow_server.py
  2. 3
    2
      rag/svr/task_executor.py

+ 3
- 2
api/ragflow_server.py 查看文件

@@ -14,8 +14,9 @@
# limitations under the License.
#

from beartype.claw import beartype_packages
beartype_packages(["agent", "api", "deepdoc", "plugins", "rag", "ragflow_sdk"]) # <-- raise exceptions in your code
from beartype import BeartypeConf
from beartype.claw import beartype_all # <-- you didn't sign up for this
beartype_all(conf=BeartypeConf(violation_type=UserWarning)) # <-- emit warnings from all code

import logging
from api.utils.log_utils import initRootLogger

+ 3
- 2
rag/svr/task_executor.py 查看文件

@@ -13,8 +13,9 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
from beartype.claw import beartype_packages
beartype_packages(["agent", "api", "deepdoc", "plugins", "rag", "ragflow_sdk"]) # <-- raise exceptions in your code
from beartype import BeartypeConf
from beartype.claw import beartype_all # <-- you didn't sign up for this
beartype_all(conf=BeartypeConf(violation_type=UserWarning)) # <-- emit warnings from all code

import logging
import sys

正在加载...
取消
保存