MCPcopy Create free account
hub / github.com/dagger/dagger / render_body

Method render_body

sdk/python/codegen/src/codegen/generator.py:1077–1091  ·  view source on GitHub ↗
(self, t: GraphQLObjectType)

Source from the content-addressed store, hash-verified

1075
1076 @joiner
1077 def render_body(self, t: GraphQLObjectType) -> Iterator[str]:
1078 yield super().render_body(t)
1079
1080 if is_self_chainable(t):
1081 self_name = self.type_name(t)
1082 yield textwrap.dedent(
1083 f'''
1084 def with_(self, cb: Callable[["{self_name}"], "{self_name}"]) -> "{self_name}":
1085 """Call the provided callable with current {self_name}.
1086
1087 This is useful for reusability and readability by not breaking the calling chain.
1088 """
1089 return cb(self)
1090 ''' # noqa: E501
1091 )

Callers

nothing calls this directly

Calls 3

type_nameMethod · 0.95
is_self_chainableFunction · 0.85
render_bodyMethod · 0.45

Tested by

no test coverage detected