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

Method newStyle

Lib/pagebot/document.py:528–533  ·  view source on GitHub ↗

Creates a new style with the supplied arguments as attributes. Forces the style in self.styles, even if already exists. Forces the name of the style to be the same as the style key. Answers the new style.

(self, **kwargs)

Source from the content-addressed store, hash-verified

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.
530 Forces the style in self.styles, even if already exists. Forces the
531 name of the style to be the same as the style key. Answers the new
532 style."""
533 return self.replaceStyle(kwargs['name'], dict(**kwargs))
534
535 # D E F A U L T A T T R I B U T E S
536

Callers

nothing calls this directly

Calls 1

replaceStyleMethod · 0.95

Tested by

no test coverage detected