Skip to content

Commit

Permalink
[pre-commit.ci] Apply automatic pre-commit fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
pre-commit-ci[bot] committed Dec 10, 2024
1 parent 85f1200 commit cad48b9
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,10 @@ def paginated_api_response(
)
return {
"status": "ok",
"data": [object_schema.model_validate(_).model_dump(exclude=exclude) for _ in query.all()],
"data": [
object_schema.model_validate(_).model_dump(exclude=exclude)
for _ in query.all()
],
"page": (paginated_args["offset"] // paginated_args["limit"]) + 1,
"size": paginated_args["limit"],
"count": count,
Expand Down Expand Up @@ -682,7 +685,9 @@ async def api_list_environments(
if jwt:
# Fetch the environments visible to the supplied token
role_bindings = auth.entity_bindings(
AuthenticationToken.model_validate(auth.authentication.decrypt_token(jwt))
AuthenticationToken.model_validate(
auth.authentication.decrypt_token(jwt)
)
)
else:
role_bindings = None
Expand Down Expand Up @@ -887,7 +892,9 @@ async def api_post_specification(
"description": environment_description,
"lockfile": specification,
}
specification = schema.LockfileSpecification.model_validate(lockfile_spec)
specification = schema.LockfileSpecification.model_validate(
lockfile_spec
)
else:
specification = schema.CondaSpecification.model_validate(specification)
except yaml.error.YAMLError:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ async def ui_get_environment(
)
if environment is None:
return templates.TemplateResponse(
request,
request,
"404.html",
{
"request": request,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,9 @@ def build_conda_environment(db: Session, conda_store, build):
else:
lock_backend, locker = conda_store.lock_plugin()
conda_lock_spec = locker.lock_environment(
spec=schema.CondaSpecification.model_validate(build.specification.spec),
spec=schema.CondaSpecification.model_validate(
build.specification.spec
),
platforms=settings.conda_solve_platforms,
context=plugin_context.PluginContext(
conda_store=conda_store,
Expand Down

0 comments on commit cad48b9

Please sign in to comment.