Skip to content

Commit

Permalink
chore(lint): bump ruff from 0.6.9 to 0.7.3 (#10714)
Browse files Browse the repository at this point in the history
  • Loading branch information
bowenliang123 authored Nov 15, 2024
1 parent c85bff2 commit 365cb4b
Show file tree
Hide file tree
Showing 6 changed files with 31 additions and 27 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import json
import random
from collections import UserDict
from datetime import datetime


Expand All @@ -10,9 +11,9 @@ class ChatRole:
FUNCTION = "function"


class _Dict(dict):
__setattr__ = dict.__setitem__
__getattr__ = dict.__getitem__
class _Dict(UserDict):
__setattr__ = UserDict.__setitem__
__getattr__ = UserDict.__getitem__

def __missing__(self, key):
return None
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 @@ -279,4 +279,4 @@ pytest-mock = "~3.14.0"
optional = true
[tool.poetry.group.lint.dependencies]
dotenv-linter = "~0.5.0"
ruff = "~0.6.9"
ruff = "~0.7.3"
3 changes: 2 additions & 1 deletion api/tests/integration_tests/vdb/__mock/baiduvectordb.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import os
from collections import UserDict
from unittest.mock import MagicMock

import pytest
Expand All @@ -11,7 +12,7 @@
from requests.adapters import HTTPAdapter


class AttrDict(dict):
class AttrDict(UserDict):
def __getattr__(self, item):
return self.get(item)

Expand Down
3 changes: 2 additions & 1 deletion api/tests/integration_tests/vdb/__mock/upstashvectordb.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import os
from collections import UserDict
from typing import Optional

import pytest
Expand Down Expand Up @@ -50,7 +51,7 @@ def info(self):
return AttrDict({"dimension": 1024})


class AttrDict(dict):
class AttrDict(UserDict):
def __getattr__(self, item):
return self.get(item)

Expand Down
3 changes: 2 additions & 1 deletion api/tests/unit_tests/oss/__mock/volcengine_tos.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import os
from collections import UserDict
from unittest.mock import MagicMock

import pytest
Expand All @@ -14,7 +15,7 @@
)


class AttrDict(dict):
class AttrDict(UserDict):
def __getattr__(self, item):
return self.get(item)

Expand Down

0 comments on commit 365cb4b

Please sign in to comment.