MCPcopy
hub / github.com/psf/black / CellMagic

Class CellMagic

src/black/handle_ipynb_magics.py:366–375  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

364
365@dataclasses.dataclass(frozen=True)
366class CellMagic:
367 name: str
368 params: str | None
369 body: str
370
371 @property
372 def header(self) -> str:
373 if self.params:
374 return f"%%{self.name} {self.params}"
375 return f"%%{self.name}"
376
377
378# ast.NodeVisitor + dataclass = breakage under mypyc.

Callers 1

visit_ExprMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected