Skip to content

Commit 51cc2b8

Browse files
committed
fix: pre-commit issues
1 parent 0e8c272 commit 51cc2b8

File tree

10 files changed

+400
-171
lines changed

10 files changed

+400
-171
lines changed

deno.lock

Lines changed: 133 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

tests/internal/py/logic_types.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ class Ctx:
1212
def gql(self, query: str, variables: str) -> Any:
1313
pass
1414

15+
1516
class Struct:
1617
def repr(self):
1718
return asdict(self)
@@ -96,14 +97,16 @@ class RootSumFnInput(Struct):
9697

9798
TypeRootSumFnInputFirstFloat = float
9899

100+
99101
def __repr(value: Any):
100102
if isinstance(value, Struct):
101103
return value.repr()
102104
return value
103105

104106

105-
106-
def typed_remote_sum(user_fn: Callable[[RootSumFnInput, Ctx], TypeRootSumFnInputFirstFloat]):
107+
def typed_remote_sum(
108+
user_fn: Callable[[RootSumFnInput, Ctx], TypeRootSumFnInputFirstFloat],
109+
):
107110
def exported_wrapper(raw_inp, ctx):
108111
inp: RootSumFnInput = Struct.new(RootSumFnInput, raw_inp)
109112
out: TypeRootSumFnInputFirstFloat = user_fn(inp, ctx)
@@ -112,5 +115,3 @@ def exported_wrapper(raw_inp, ctx):
112115
return __repr(out)
113116

114117
return exported_wrapper
115-
116-

tests/metagen/metagen_test.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,10 @@ async function prepareBucket() {
3939

4040
try {
4141
await createBucket(client, "metagen-test-bucket");
42-
} catch (err) {
43-
console.log("error creating bucket", { err });
44-
//
42+
} catch (err: any) {
43+
if (err?.Code != "BucketAlreadyOwnedByYou") {
44+
throw err;
45+
}
4546
}
4647
}
4748

tests/metagen/typegraphs/identities/py/handlers_types.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ class Ctx:
1212
def gql(self, query: str, variables: str) -> Any:
1313
pass
1414

15+
1516
class Struct:
1617
def repr(self):
1718
return asdict(self)
@@ -210,14 +211,12 @@ class SimpleCycles3(Struct):
210211
FORWARD_REFS["SimpleCycles3"] = SimpleCycles3
211212

212213

213-
214214
def __repr(value: Any):
215215
if isinstance(value, Struct):
216216
return value.repr()
217217
return value
218218

219219

220-
221220
def typed_primitives(user_fn: Callable[[PrimitivesArgs, Ctx], Primitives]):
222221
def exported_wrapper(raw_inp, ctx):
223222
inp: PrimitivesArgs = Struct.new(PrimitivesArgs, raw_inp)
@@ -260,5 +259,3 @@ def exported_wrapper(raw_inp, ctx):
260259
return __repr(out)
261260

262261
return exported_wrapper
263-
264-

0 commit comments

Comments
 (0)