Skip to content

Commit da64733

Browse files
authored
Merge pull request #2442 from tisnik/lcore-3581-ruf-rule-fixes
LCORE-3581: RUF rule fixes
2 parents 217e1eb + 7d1e28b commit da64733

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

src/app/endpoints/vector_stores.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -539,7 +539,7 @@ async def create_file( # pylint: disable=too-many-branches,too-many-statements
539539
response = FileTooLargeResponse.from_backend_rejection(message=str(e))
540540
else:
541541
response = InternalServerErrorResponse.query_failed(
542-
cause=f"File upload rejected by Llama Stack: {str(e)}"
542+
cause=f"File upload rejected by Llama Stack: {e!s}"
543543
)
544544
# Override to use 400 status code since it's a client error
545545
response.status_code = status.HTTP_400_BAD_REQUEST

tests/unit/app/test_routers.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ def get_router_prefix(self, router: Any) -> Optional[str]:
114114
------
115115
IndexError: If the router is not registered in the mock app.
116116
"""
117-
return list(filter(lambda r: r[0] == router, self.routers))[0][1]
117+
return next(filter(lambda r: r[0] == router, self.routers))[1]
118118

119119

120120
def test_include_routers() -> None:

0 commit comments

Comments
 (0)