MCPcopy Create free account
hub / github.com/pytest-dev/pytest / ReprFuncArgs

Class ReprFuncArgs

src/_pytest/_code/code.py:1180–1199  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1178
1179@attr.s(eq=False, auto_attribs=True)
1180class ReprFuncArgs(TerminalRepr):
1181 args: Sequence[Tuple[str, object]]
1182
1183 def toterminal(self, tw: TerminalWriter) -> None:
1184 if self.args:
1185 linesofar = ""
1186 for name, value in self.args:
1187 ns = f"{name} = {value}"
1188 if len(ns) + len(linesofar) + 2 > tw.fullwidth:
1189 if linesofar:
1190 tw.line(linesofar)
1191 linesofar = ns
1192 else:
1193 if linesofar:
1194 linesofar += ", " + ns
1195 else:
1196 linesofar = ns
1197 if linesofar:
1198 tw.line(linesofar)
1199 tw.line("")
1200
1201
1202def getfslineno(obj: object) -> Tuple[Union[str, Path], int]:

Callers 3

deserialize_repr_entryFunction · 0.90
repr_argsMethod · 0.85

Calls

no outgoing calls