Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions docs/04_upgrading/upgrading_to_v3.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,9 @@ client.key_value_store('my-store').set_record('my-key', {'data': 1}, 'applicatio
client.run('my-run').charge('my-event', 5, 'my-idempotency-key')

# After
client.key_value_store('my-store').set_record('my-key', {'data': 1}, content_type='application/json')
client.key_value_store('my-store').set_record(
'my-key', {'data': 1}, content_type='application/json'
)
client.run('my-run').charge('my-event', count=5, idempotency_key='my-idempotency-key')
```

Expand All @@ -97,10 +99,10 @@ Generated enum-like types are now [`Literal`](https://docs.python.org/3/library/

```python
# Before
event_types=[WebhookEventType.ACTOR_RUN_SUCCEEDED]
event_types = [WebhookEventType.ACTOR_RUN_SUCCEEDED]

# After
event_types=['ACTOR.RUN.SUCCEEDED']
event_types = ['ACTOR.RUN.SUCCEEDED']
```

Affected types: `ActorJobStatus`, `ActorPermissionLevel`, `ErrorType`, `GeneralAccess`, `HttpMethod`, `RunOrigin`, `SourceCodeFileFormat`, `StorageOwnership`, `VersionSourceType`, `WebhookDispatchStatus`, `WebhookEventType`. For more on the generated types and how they fit into the typed client surface, see [Typed models](/api/client/python/docs/concepts/typed-models).
Expand Down
11 changes: 6 additions & 5 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -83,15 +83,16 @@ only-include = [
[tool.ruff]
line-length = 120
include = [
"src/**/*.py",
"tests/**/*.py",
"scripts/**/*.py",
"docs/**/*.py",
"website/**/*.py",
"**/*.py",
# Ruff formats Python code blocks embedded in Markdown files.
"**/*.md",
"**/*.mdx",
]
exclude = [
"website/versioned_docs/**",
]
# MDX is Markdown; without this mapping Ruff would try to parse `.mdx` files as Python.
extension = { mdx = "markdown" }

[tool.ruff.lint]
select = ["ALL"]
Expand Down
Loading