Skip to content

Commit d2af258

Browse files
authored
fix(viewer): add missing parenthesis in Python SDK code rendering (#1018)
1 parent 3f7efb4 commit d2af258

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

src/components/Docs/SnippetViewer/BatchCheckRequestViewer.tsx

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -231,8 +231,9 @@ response.Responses = [${checks
231231
case SupportedLanguage.PYTHON_SDK:
232232
return `# Requires >=v0.9.0 for the server side BatchCheck, earlier versions support a client-side BatchCheck with a slightly different interface
233233
234-
checks = [${checks.map(
235-
(check) => `
234+
checks = [${checks
235+
.map(
236+
(check) => `
236237
ClientBatchCheckItem(
237238
user="${check.user}",
238239
relation="${check.relation}",
@@ -242,8 +243,10 @@ checks = [${checks.map(
242243
? `,
243244
contextual_tuples=[${check.contextualTuples.map((tuple) => `ClientTuple(user="${tuple.user}", relation="${tuple.relation}", object="${tuple.object}")`).join(',')}]`
244245
: ''
245-
}`,
246-
)}
246+
}
247+
)`,
248+
)
249+
.join(',')}
247250
]
248251
options = {${modelId ? `\n "authorization_model_id": "${modelId}"` : ''}}
249252
response = await fga_client.batch_check(ClientBatchCheckRequest(checks=checks), options)

0 commit comments

Comments
 (0)