MCPcopy Index your code
hub / github.com/WhyNotHugo/python-barcode / set_options

Method set_options

barcode/writer.py:185–195  ·  view source on GitHub ↗

Sets the given options as instance attributes (only if they are known). :param options: All known instance attributes and more if the child class has defined them before this call.

(self, options: dict)

Source from the content-addressed store, hash-verified

183 self._callbacks[action] = callback
184
185 def set_options(self, options: dict) -> None:
186 """Sets the given options as instance attributes (only
187 if they are known).
188
189 :param options: All known instance attributes and more if the child class
190 has defined them before this call.
191 """
192 for key, val in options.items():
193 key = key.lstrip("_")
194 if hasattr(self, key):
195 setattr(self, key, val)
196
197 def packed(self, line: str) -> Generator[tuple[int, float], str, None]:
198 """

Callers 2

renderMethod · 0.80
generateFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected