diff --git a/docs/04_upgrading/upgrading_to_v3.mdx b/docs/04_upgrading/upgrading_to_v3.mdx index 9b2051b1..7572c19a 100644 --- a/docs/04_upgrading/upgrading_to_v3.mdx +++ b/docs/04_upgrading/upgrading_to_v3.mdx @@ -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') ``` @@ -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). diff --git a/pyproject.toml b/pyproject.toml index 4407c152..8c1aff54 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -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"]