Skip to content

Commit 9b2f4a4

Browse files
chore: suppress deprecation warning on IAM api_tokens.create usage
The invite-user snippet intentionally exercises the deprecated `api_tokens.create` method to demonstrate the end-to-end invite flow. Add a targeted pyright ignore so `./scripts/lint` passes cleanly on the repo (was failing on `next`).
1 parent 96cd4c9 commit 9b2f4a4

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

examples/snippets/invite_user_assign_cloud_role_issue_token.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ def main() -> None:
4646
# Step 3: Create API token for the invited user (expires in 1 month)
4747
expires_in_days = 30
4848
exp_date = (datetime.now(timezone.utc) + timedelta(days=expires_in_days)).isoformat()
49-
gcore.iam.api_tokens.create(
49+
gcore.iam.api_tokens.create( # pyright: ignore[reportDeprecated]
5050
client_id=client_id,
5151
client_user=ClientUser(role=user_role),
5252
exp_date=exp_date,

0 commit comments

Comments
 (0)