mirror of
https://github.com/infiniflow/ragflow.git
synced 2025-12-08 20:42:30 +08:00
Fix errors detected by Ruff (#3918)
### What problem does this PR solve? Fix errors detected by Ruff ### Type of change - [x] Refactoring
This commit is contained in:
@ -36,7 +36,7 @@ class RAGFlowHtmlParser:
|
||||
|
||||
@classmethod
|
||||
def parser_txt(cls, txt):
|
||||
if type(txt) != str:
|
||||
if not isinstance(txt, str):
|
||||
raise TypeError("txt type should be str!")
|
||||
html_doc = readability.Document(txt)
|
||||
title = html_doc.title()
|
||||
|
||||
Reference in New Issue
Block a user