chore: refurish python code by applying Pylint linter rules (#8322)
This commit is contained in:
parent
1ab81b4972
commit
a1104ab97e
126 changed files with 253 additions and 272 deletions
|
|
@ -284,9 +284,9 @@ class Document(db.Model):
|
|||
status = None
|
||||
if self.indexing_status == "waiting":
|
||||
status = "queuing"
|
||||
elif self.indexing_status not in ["completed", "error", "waiting"] and self.is_paused:
|
||||
elif self.indexing_status not in {"completed", "error", "waiting"} and self.is_paused:
|
||||
status = "paused"
|
||||
elif self.indexing_status in ["parsing", "cleaning", "splitting", "indexing"]:
|
||||
elif self.indexing_status in {"parsing", "cleaning", "splitting", "indexing"}:
|
||||
status = "indexing"
|
||||
elif self.indexing_status == "error":
|
||||
status = "error"
|
||||
|
|
@ -331,7 +331,7 @@ class Document(db.Model):
|
|||
"created_at": file_detail.created_at.timestamp(),
|
||||
}
|
||||
}
|
||||
elif self.data_source_type == "notion_import" or self.data_source_type == "website_crawl":
|
||||
elif self.data_source_type in {"notion_import", "website_crawl"}:
|
||||
return json.loads(self.data_source_info)
|
||||
return {}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue