chore: apply ruff's pyupgrade linter rules to modernize Python code with targeted version (#2419)

This commit is contained in:
Bowen Liang
2024-02-09 15:21:33 +08:00
committed by GitHub
parent 589099a005
commit 063191889d
246 changed files with 912 additions and 937 deletions

View File

@@ -1,5 +1,4 @@
import logging
from typing import List
from langchain.document_loaders.base import BaseLoader
from langchain.schema import Document
@@ -23,7 +22,7 @@ class ExcelLoader(BaseLoader):
"""Initialize with file path."""
self._file_path = file_path
def load(self) -> List[Document]:
def load(self) -> list[Document]:
data = []
keys = []
wb = load_workbook(filename=self._file_path, read_only=True)