Skip to content

Commit f3273ca

Browse files
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent d79cebe commit f3273ca

14 files changed

Lines changed: 47 additions & 32 deletions

File tree

01-hello/wrangler.jsonc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,4 @@
99
"observability": {
1010
"enabled": true
1111
}
12-
}
12+
}

02-binding/src/entry.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
from workers import WorkerEntrypoint, Response
22

3+
34
class Default(WorkerEntrypoint):
45
async def fetch(self, request):
56
await self.env.FOO.put("bar", "baz")

07-durable-objects/src/entry.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
from pyodide.ffi import to_js
33
from urllib.parse import urlparse
44

5+
56
class List(DurableObject):
67
async def get_messages(self):
78
messages = await self.ctx.storage.get("messages")
@@ -20,7 +21,10 @@ async def fetch(self, request):
2021

2122
list_id = url.path.split("/")[1]
2223
if list_id == "":
23-
return Response("Go to /<list_id>/show to see messages\nGo to /<list_id>/add/<message> to add a message", status=400)
24+
return Response(
25+
"Go to /<list_id>/show to see messages\nGo to /<list_id>/add/<message> to add a message",
26+
status=400,
27+
)
2428

2529
do_id = self.env.LISTS.idFromName(list_id)
2630
stub = self.env.LISTS.get(do_id)

07-durable-objects/worker-configuration.d.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6977,7 +6977,7 @@ interface IncomingRequestCfPropertiesTLSClientAuthPlaceholder {
69776977
certNotAfter: "";
69786978
}
69796979
/** Possible outcomes of TLS verification */
6980-
declare type CertVerificationStatus =
6980+
declare type CertVerificationStatus =
69816981
/** Authentication succeeded */
69826982
"SUCCESS"
69836983
/** No certificate was presented */
@@ -7041,7 +7041,7 @@ interface D1ExecResult {
70417041
count: number;
70427042
duration: number;
70437043
}
7044-
type D1SessionConstraint =
7044+
type D1SessionConstraint =
70457045
// Indicates that the first query should go to the primary, and the rest queries
70467046
// using the same D1DatabaseSession will go to any replica that is consistent with
70477047
// the bookmark maintained by the session (returned by the first query).
@@ -7622,7 +7622,7 @@ declare namespace Rpc {
76227622
// The reason for using a generic type here is to build a serializable subset of structured
76237623
// cloneable composite types. This allows types defined with the "interface" keyword to pass the
76247624
// serializable check as well. Otherwise, only types defined with the "type" keyword would pass.
7625-
type Serializable<T> =
7625+
type Serializable<T> =
76267626
// Structured cloneables
76277627
BaseType
76287628
// Structured cloneable composites

08-cron/src/entry.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,12 @@
11
from workers import WorkerEntrypoint, Response
22

3+
34
class Default(WorkerEntrypoint):
45
# runs based on "triggers" in wrangler config
56
async def scheduled(self, controller, env, ctx):
67
print("Scheduled task has been executed.")
78

89
async def fetch(self):
9-
return Response("Hello from Cron Worker - Check your logs to see a scheduled task executed every minute")
10+
return Response(
11+
"Hello from Cron Worker - Check your logs to see a scheduled task executed every minute"
12+
)

08-cron/worker-configuration.d.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6977,7 +6977,7 @@ interface IncomingRequestCfPropertiesTLSClientAuthPlaceholder {
69776977
certNotAfter: "";
69786978
}
69796979
/** Possible outcomes of TLS verification */
6980-
declare type CertVerificationStatus =
6980+
declare type CertVerificationStatus =
69816981
/** Authentication succeeded */
69826982
"SUCCESS"
69836983
/** No certificate was presented */
@@ -7041,7 +7041,7 @@ interface D1ExecResult {
70417041
count: number;
70427042
duration: number;
70437043
}
7044-
type D1SessionConstraint =
7044+
type D1SessionConstraint =
70457045
// Indicates that the first query should go to the primary, and the rest queries
70467046
// using the same D1DatabaseSession will go to any replica that is consistent with
70477047
// the bookmark maintained by the session (returned by the first query).
@@ -7622,7 +7622,7 @@ declare namespace Rpc {
76227622
// The reason for using a generic type here is to build a serializable subset of structured
76237623
// cloneable composite types. This allows types defined with the "interface" keyword to pass the
76247624
// serializable check as well. Otherwise, only types defined with the "type" keyword would pass.
7625-
type Serializable<T> =
7625+
type Serializable<T> =
76267626
// Structured cloneables
76277627
BaseType
76287628
// Structured cloneable composites

08-cron/wrangler.jsonc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,4 @@
1414
"observability": {
1515
"enabled": true
1616
}
17-
}
17+
}

09-workers-ai/src/entry.py

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,14 @@
11
from workers import WorkerEntrypoint, Response
22

3+
34
class Default(WorkerEntrypoint):
45
async def fetch(self, request):
5-
response = await self.env.AI.run("@cf/openai/gpt-oss-120b", {
6-
"instructions": 'You are a concise assistant.',
7-
"input": "What is the origin of the phrase 'The King is dead, long live the King!'?"
8-
})
6+
response = await self.env.AI.run(
7+
"@cf/openai/gpt-oss-120b",
8+
{
9+
"instructions": "You are a concise assistant.",
10+
"input": "What is the origin of the phrase 'The King is dead, long live the King!'?",
11+
},
12+
)
913

1014
return Response.json(response.output)
11-

09-workers-ai/worker-configuration.d.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6977,7 +6977,7 @@ interface IncomingRequestCfPropertiesTLSClientAuthPlaceholder {
69776977
certNotAfter: "";
69786978
}
69796979
/** Possible outcomes of TLS verification */
6980-
declare type CertVerificationStatus =
6980+
declare type CertVerificationStatus =
69816981
/** Authentication succeeded */
69826982
"SUCCESS"
69836983
/** No certificate was presented */
@@ -7041,7 +7041,7 @@ interface D1ExecResult {
70417041
count: number;
70427042
duration: number;
70437043
}
7044-
type D1SessionConstraint =
7044+
type D1SessionConstraint =
70457045
// Indicates that the first query should go to the primary, and the rest queries
70467046
// using the same D1DatabaseSession will go to any replica that is consistent with
70477047
// the bookmark maintained by the session (returned by the first query).
@@ -7622,7 +7622,7 @@ declare namespace Rpc {
76227622
// The reason for using a generic type here is to build a serializable subset of structured
76237623
// cloneable composite types. This allows types defined with the "interface" keyword to pass the
76247624
// serializable check as well. Otherwise, only types defined with the "type" keyword would pass.
7625-
type Serializable<T> =
7625+
type Serializable<T> =
76267626
// Structured cloneables
76277627
BaseType
76287628
// Structured cloneable composites

09-workers-ai/wrangler.jsonc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,4 @@
1212
"observability": {
1313
"enabled": true
1414
}
15-
}
15+
}

0 commit comments

Comments
 (0)