Add errorhandler decorator for the blueprintplugin #1059
If it helps, I bite myself in the arse for not converting the source to spaces back when I forked from Cura ;) I could bite myself for a lot of things that are now hard to change without making debugging more complicated, merging of bug fixes impossible etc or just have a completely wrong cost/usefulness ratio...
class CuraPlugin(octoprint.plugin.SlicerPlugin, octoprint.plugin.SettingsPlugin, octoprint.plugin.TemplatePlugin, octoprint.plugin.AssetPlugin, octoprint.plugin.BlueprintPlugin, octoprint.plugin.StartupPlugin):
which again is a case of smart tabs at work and
deprecated = warning_decorator_factory(DeprecationWarning) """ A decorator for deprecated methods. Logs a deprecation warning via Python's `:mod:`warnings` module including the supplied ``message``. The call stack level used (for adding the source location of the offending call to the warning) can be overridden using the optional ``stacklevel`` parameter. If both ``since`` and ``includedoc`` are provided, a deprecation warning will also be added to the function's docstring by providing or extending its ``__doc__`` property. Arguments: message (string): The message to include in the deprecation warning. stacklevel (int): Stack level for including the caller of the offending method in the logged warning. Defaults to 1, meaning the direct caller of the method. It might make sense to increase this in case of the function call happening dynamically from a fixed position to not shadow the real caller (e.g. in case of overridden ``getattr`` methods). includedoc (string): Message about the deprecation to include in the wrapped function's docstring. extenddoc (boolean): If True the original docstring of the wrapped function will be extended by the deprecation message, if False (default) it will be replaced with the deprecation message. since (string): Version since when the function was deprecated, must be present for the docstring to get extended. Returns: function: The wrapped function with the deprecation warnings in place. """
which is a valid napoleon docstring.
However, that high number you saw there got me curious, so I just went through the output of