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

Method as_arg

sdk/python/codegen/src/codegen/generator.py:655–662  ·  view source on GitHub ↗

As a Arg object for the query builder.

(self)

Source from the content-addressed store, hash-verified

653 yield from wrap_indent(directive)
654
655 def as_arg(self) -> str:
656 """As a Arg object for the query builder."""
657 params = [quote(self.graphql_name), self.name]
658 if self.default_is_mutable:
659 params[1] = f"{self.default_value} if {self.name} is None else {self.name}"
660 if self.has_default:
661 params.append(self.default_value)
662 return f"Arg({', '.join(params)}),"
663
664
665class _ObjectField:

Callers 2

test_input_field_argFunction · 0.80
func_bodyMethod · 0.80

Calls 2

quoteFunction · 0.85
appendMethod · 0.45

Tested by 1

test_input_field_argFunction · 0.64