Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: bump ruff to 0.6.8 for fixing violation in SIM910 #8869

Merged
merged 1 commit into from
Sep 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,7 @@ def inner(func: CallableT) -> CallableT:
@functools.wraps(func)
def wrapper(*args: object, **kwargs: object) -> object:
given_params: set[str] = set()
for i, _ in enumerate(args):
for i in range(len(args)):
try:
given_params.add(positional[i])
except IndexError:
Expand Down
2 changes: 1 addition & 1 deletion api/core/rag/datasource/keyword/jieba/jieba.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ def add_texts(self, texts: list[Document], **kwargs):
keyword_table_handler = JiebaKeywordTableHandler()

keyword_table = self._get_dataset_keyword_table()
keywords_list = kwargs.get("keywords_list", None)
keywords_list = kwargs.get("keywords_list")
for i in range(len(texts)):
text = texts[i]
if keywords_list:
Expand Down
2 changes: 1 addition & 1 deletion api/events/event_handlers/create_document_index.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
@document_index_created.connect
def handle(sender, **kwargs):
dataset_id = sender
document_ids = kwargs.get("document_ids", None)
document_ids = kwargs.get("document_ids")
documents = []
start_at = time.perf_counter()
for document_id in document_ids:
Expand Down
40 changes: 20 additions & 20 deletions api/poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion api/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -286,4 +286,4 @@ optional = true

[tool.poetry.group.lint.dependencies]
dotenv-linter = "~0.5.0"
ruff = "~0.6.5"
ruff = "~0.6.8"
2 changes: 1 addition & 1 deletion api/tests/integration_tests/tools/__mock/http.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ def httpx_request(
request = httpx.Request(
method, url, params=kwargs.get("params"), headers=kwargs.get("headers"), cookies=kwargs.get("cookies")
)
data = kwargs.get("data", None)
data = kwargs.get("data")
resp = json.dumps(data).encode("utf-8") if data else b"OK"
response = httpx.Response(
status_code=200,
Expand Down
4 changes: 2 additions & 2 deletions api/tests/integration_tests/workflow/nodes/__mock/http.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ def httpx_request(
return response

# get data, files
data = kwargs.get("data", None)
files = kwargs.get("files", None)
data = kwargs.get("data")
files = kwargs.get("files")
if data is not None:
resp = dumps(data).encode("utf-8")
elif files is not None:
Expand Down