MCPcopy Create free account
hub / github.com/PageBot/PageBot / replaceStyle

Method replaceStyle

Lib/pagebot/document.py:520–526  ·  view source on GitHub ↗

Set the style by name. Overwrite the style with that name if it already exists.

(self, name, style)

Source from the content-addressed store, hash-verified

518 del self.styles[name]
519
520 def replaceStyle(self, name, style):
521 """Set the style by name. Overwrite the style with that name if it
522 already exists."""
523 self.styles[name] = style
524 # Force the name of the style to synchronize with the requested key.
525 style['name'] = name
526 return style # used e.g. when called by self.newStyle(args,...)
527
528 def newStyle(self, **kwargs):
529 """Creates a new style with the supplied arguments as attributes.

Callers 2

addStyleMethod · 0.95
newStyleMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected