Use py3 style classes
This commit is contained in:
37 files changed
+72
-72
No files matched your search
@@ -28,7 +28,7 @@ class GroupPermission(Permission):
|
||||
super(GroupPermission, self).__init__(need)
|
||||
|
||||
|
||||
class GroupManager(object):
|
||||
class GroupManager:
|
||||
@classmethod
|
||||
def default_permissions_for_group(cls, group):
|
||||
result = []
|
||||
@@ -158,7 +158,7 @@ class GroupManager(object):
|
||||
except Exception:
|
||||
self._logger.exception("Error notifying listener {!r} via {}".format(listener, method))
|
||||
|
||||
class GroupChangeListener(object):
|
||||
class GroupChangeListener:
|
||||
|
||||
def on_group_added(self, group):
|
||||
pass
|
||||
@@ -428,7 +428,7 @@ class GroupCantBeChanged(Exception):
|
||||
Exception.__init__(self, "Group can't be changed: %s" % key)
|
||||
|
||||
|
||||
class Group(object):
|
||||
class Group:
|
||||
def __init__(self, key, name, description="", permissions=None, subgroups=None, default=False, removable=True, changeable=True, toggleable=True):
|
||||
self._key = key
|
||||
self._name = name
|
||||
|
||||
@@ -136,7 +136,7 @@ class PluginOctoPrintPermission(OctoPrintPermission):
|
||||
return result
|
||||
|
||||
|
||||
class PluginIdentityContext(object):
|
||||
class PluginIdentityContext:
|
||||
"""Identity context for not initialized Permissions
|
||||
|
||||
Needed to support @Permissions.PLUGIN_X_Y.require()
|
||||
|
||||
@@ -26,7 +26,7 @@ from octoprint.access.groups import GroupChangeListener, Group
|
||||
|
||||
from past.builtins import basestring
|
||||
|
||||
class UserManager(GroupChangeListener, object):
|
||||
class UserManager(GroupChangeListener):
|
||||
def __init__(self, group_manager, settings=None):
|
||||
self._group_manager = group_manager
|
||||
self._group_manager.register_listener(self)
|
||||
@@ -439,7 +439,7 @@ class UserManager(GroupChangeListener, object):
|
||||
since="1.4.0")(has_been_customized)
|
||||
|
||||
|
||||
class LoginStatusListener(object):
|
||||
class LoginStatusListener:
|
||||
|
||||
def on_user_logged_in(self, user):
|
||||
pass
|
||||
@@ -905,7 +905,7 @@ class UnknownRole(Exception):
|
||||
|
||||
##~~ Refactoring helpers
|
||||
|
||||
class MethodReplacedByBooleanProperty(object):
|
||||
class MethodReplacedByBooleanProperty:
|
||||
|
||||
def __init__(self, name, message, getter):
|
||||
self._name = name
|
||||
|
||||
@@ -9,7 +9,7 @@ import sys
|
||||
|
||||
#~~ click context
|
||||
|
||||
class OctoPrintContext(object):
|
||||
class OctoPrintContext:
|
||||
"""Custom context wrapping the standard options."""
|
||||
|
||||
def __init__(self, configfile=None, basedir=None, verbosity=0, safe_mode=False):
|
||||
|
||||
@@ -14,7 +14,7 @@ from octoprint.plugin import EnvironmentDetectionPlugin
|
||||
from octoprint.util.platform import get_os
|
||||
from octoprint.util.version import get_python_version_string
|
||||
|
||||
class EnvironmentDetector(object):
|
||||
class EnvironmentDetector:
|
||||
|
||||
def __init__(self, plugin_manager):
|
||||
self._plugin_manager = plugin_manager
|
||||
|
||||
@@ -24,7 +24,7 @@ def all_events():
|
||||
return [getattr(Events, name) for name in Events.__dict__ if not name.startswith("_") and not name in ("register_event",)]
|
||||
|
||||
|
||||
class Events(object):
|
||||
class Events:
|
||||
# server
|
||||
STARTUP = "Startup"
|
||||
SHUTDOWN = "Shutdown"
|
||||
@@ -148,7 +148,7 @@ def eventManager():
|
||||
return _instance
|
||||
|
||||
|
||||
class EventManager(object):
|
||||
class EventManager:
|
||||
"""
|
||||
Handles receiving events and dispatching them to subscribers
|
||||
"""
|
||||
@@ -258,7 +258,7 @@ class EventManager(object):
|
||||
return self._worker.is_alive()
|
||||
|
||||
|
||||
class GenericEventListener(object):
|
||||
class GenericEventListener:
|
||||
"""
|
||||
The GenericEventListener can be subclassed to easily create custom event listeners.
|
||||
"""
|
||||
|
||||
@@ -197,7 +197,7 @@ class NoSuchStorage(Exception):
|
||||
pass
|
||||
|
||||
|
||||
class FileManager(object):
|
||||
class FileManager:
|
||||
def __init__(self, analysis_queue, slicing_manager, printer_profile_manager, initial_storage_managers=None):
|
||||
self._logger = logging.getLogger(__name__)
|
||||
self._analysis_queue = analysis_queue
|
||||
|
||||
@@ -46,7 +46,7 @@ class AnalysisAborted(Exception):
|
||||
self.reenqueue = reenqueue
|
||||
|
||||
|
||||
class AnalysisQueue(object):
|
||||
class AnalysisQueue:
|
||||
"""
|
||||
OctoPrint's :class:`AnalysisQueue` can manage various :class:`AbstractAnalysisQueue` implementations, mapped
|
||||
by their machine code type.
|
||||
@@ -118,7 +118,7 @@ class AnalysisQueue(object):
|
||||
"origin": entry.location,
|
||||
"result": result})
|
||||
|
||||
class AbstractAnalysisQueue(object):
|
||||
class AbstractAnalysisQueue:
|
||||
"""
|
||||
The :class:`AbstractAnalysisQueue` is the parent class of all specific analysis queues such as the
|
||||
:class:`GcodeAnalysisQueue`. It offers methods to enqueue new entries to analyze and pausing and resuming analysis
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
__license__ = 'GNU Affero General Public License http://www.gnu.org/licenses/agpl.html'
|
||||
|
||||
class FileDestinations(object):
|
||||
class FileDestinations:
|
||||
|
||||
SDCARD = "sdcard"
|
||||
LOCAL = "local"
|
||||
@@ -27,7 +27,7 @@ import octoprint.filemanager
|
||||
|
||||
from octoprint.util import is_hidden_path, to_unicode, to_bytes
|
||||
|
||||
class StorageInterface(object):
|
||||
class StorageInterface:
|
||||
"""
|
||||
Interface of storage adapters for OctoPrint.
|
||||
"""
|
||||
|
||||
@@ -8,7 +8,7 @@ import os
|
||||
from octoprint import UMASK
|
||||
from octoprint.util import atomic_write
|
||||
|
||||
class AbstractFileWrapper(object):
|
||||
class AbstractFileWrapper:
|
||||
"""
|
||||
Wrapper for file representations to save to storages.
|
||||
|
||||
|
||||
@@ -233,7 +233,7 @@ def call_plugin(types, method, args=None, kwargs=None, callback=None, error_call
|
||||
error_callback(plugin._identifier, plugin, exc)
|
||||
|
||||
|
||||
class PluginSettings(object):
|
||||
class PluginSettings:
|
||||
"""
|
||||
The :class:`PluginSettings` class is the interface for plugins to their own or globally defined settings.
|
||||
|
||||
|
||||
@@ -72,7 +72,7 @@ EntryPointOrigin = namedtuple("EntryPointOrigin", "type, entry_point, module_nam
|
||||
FolderOrigin = namedtuple("FolderOrigin", "type, folder")
|
||||
ModuleOrigin = namedtuple("PackageOrigin", "type, module_name, folder")
|
||||
|
||||
class PluginInfo(object):
|
||||
class PluginInfo:
|
||||
"""
|
||||
The :class:`PluginInfo` class wraps all available information about a registered plugin.
|
||||
|
||||
@@ -636,7 +636,7 @@ class PluginInfo(object):
|
||||
return result
|
||||
|
||||
|
||||
class PluginManager(object):
|
||||
class PluginManager:
|
||||
"""
|
||||
The :class:`PluginManager` is the central component for finding, loading and accessing plugins provided to the
|
||||
system.
|
||||
@@ -1791,7 +1791,7 @@ class EntryPointMetadata(pkginfo.Distribution):
|
||||
warnings.warn('No package metadata found for package {}'.format(self.entry_point.module_name))
|
||||
|
||||
|
||||
class Plugin(object):
|
||||
class Plugin:
|
||||
"""
|
||||
The parent class of all plugin implementations.
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@ from octoprint.events import Events
|
||||
import flask
|
||||
from flask_babel import gettext
|
||||
|
||||
class Prompt(object):
|
||||
class Prompt:
|
||||
|
||||
def __init__(self, text):
|
||||
self.text = text
|
||||
|
||||
@@ -24,7 +24,7 @@ class AppAlreadyExists(Exception):
|
||||
pass
|
||||
|
||||
|
||||
class PendingDecision(object):
|
||||
class PendingDecision:
|
||||
def __init__(self, app_id, app_token, user_id, user_token, timeout_callback=None):
|
||||
self.app_id = app_id
|
||||
self.app_token = app_token
|
||||
@@ -48,7 +48,7 @@ class PendingDecision(object):
|
||||
self.user_token)
|
||||
|
||||
|
||||
class ReadyDecision(object):
|
||||
class ReadyDecision:
|
||||
def __init__(self, app_id, app_token, user_id):
|
||||
self.app_id = app_id
|
||||
self.app_token = app_token
|
||||
@@ -64,7 +64,7 @@ class ReadyDecision(object):
|
||||
self.user_id)
|
||||
|
||||
|
||||
class ActiveKey(object):
|
||||
class ActiveKey:
|
||||
def __init__(self, app_id, api_key, user_id):
|
||||
self.app_id = app_id
|
||||
self.api_key = api_key
|
||||
|
||||
@@ -10,7 +10,7 @@ from octoprint.access import ADMIN_GROUP, USER_GROUP
|
||||
from octoprint.util import to_native_str
|
||||
|
||||
# noinspection PyUnresolvedReferences,PyMethodMayBeStatic
|
||||
class ServerCommandsSubwizard(object):
|
||||
class ServerCommandsSubwizard:
|
||||
def _is_servercommands_wizard_firstrunonly(self):
|
||||
return True
|
||||
|
||||
@@ -29,7 +29,7 @@ class ServerCommandsSubwizard(object):
|
||||
|
||||
|
||||
# noinspection PyUnresolvedReferences,PyMethodMayBeStatic
|
||||
class WebcamSubwizard(object):
|
||||
class WebcamSubwizard:
|
||||
def _is_webcam_wizard_firstrunonly(self):
|
||||
return True
|
||||
|
||||
@@ -48,7 +48,7 @@ class WebcamSubwizard(object):
|
||||
|
||||
|
||||
# noinspection PyUnresolvedReferences,PyMethodMayBeStatic
|
||||
class AclSubwizard(object):
|
||||
class AclSubwizard:
|
||||
def _is_acl_wizard_firstrunonly(self):
|
||||
return True
|
||||
|
||||
@@ -93,7 +93,7 @@ class AclSubwizard(object):
|
||||
|
||||
|
||||
# noinspection PyUnresolvedReferences,PyMethodMayBeStatic
|
||||
class OnlineCheckSubwizard(object):
|
||||
class OnlineCheckSubwizard:
|
||||
def _is_onlinecheck_wizard_firstrunonly(self):
|
||||
return False
|
||||
|
||||
@@ -111,7 +111,7 @@ class OnlineCheckSubwizard(object):
|
||||
|
||||
|
||||
# noinspection PyUnresolvedReferences,PyMethodMayBeStatic
|
||||
class PluginBlacklistSubwizard(object):
|
||||
class PluginBlacklistSubwizard:
|
||||
def _is_pluginblacklist_wizard_firstrunonly(self):
|
||||
return False
|
||||
|
||||
@@ -129,7 +129,7 @@ class PluginBlacklistSubwizard(object):
|
||||
|
||||
|
||||
# noinspection PyUnresolvedReferences,PyMethodMayBeStatic
|
||||
class PrinterProfileSubwizard(object):
|
||||
class PrinterProfileSubwizard:
|
||||
def _is_printerprofile_wizard_firstrunonly(self):
|
||||
return True
|
||||
|
||||
|
||||
@@ -288,7 +288,7 @@ class DiscoveryPlugin(octoprint.plugin.StartupPlugin,
|
||||
result_available = threading.Event()
|
||||
result_available.clear()
|
||||
|
||||
class ZeroconfListener(object):
|
||||
class ZeroconfListener:
|
||||
def __init__(self, logger):
|
||||
self._logger = logger
|
||||
|
||||
|
||||
@@ -48,7 +48,7 @@ _FLAG_PAST_UNDERVOLTAGE = 1 << 16
|
||||
_FLAG_PAST_FREQ_CAPPED = 1 << 17
|
||||
_FLAG_PAST_THROTTLED = 1 << 18
|
||||
|
||||
class ThrottleState(object):
|
||||
class ThrottleState:
|
||||
@classmethod
|
||||
def from_value(cls, value=0):
|
||||
if value == 0:
|
||||
|
||||
@@ -31,7 +31,7 @@ from typing import Any
|
||||
|
||||
|
||||
# noinspection PyBroadException
|
||||
class VirtualPrinter(object):
|
||||
class VirtualPrinter:
|
||||
command_regex = re.compile(r"^([GMTF])(\d+)")
|
||||
sleep_regex = re.compile(r"sleep (\d+)")
|
||||
sleep_after_regex = re.compile(r"sleep_after ([GMTF]\d+) (\d+)")
|
||||
|
||||
@@ -32,7 +32,7 @@ def get_connection_options():
|
||||
return PrinterInterface.get_connection_options()
|
||||
|
||||
|
||||
class PrinterInterface(object):
|
||||
class PrinterInterface:
|
||||
"""
|
||||
The :class:`PrinterInterface` represents the developer interface to the :class:`~octoprint.printer.standard.Printer`
|
||||
instance.
|
||||
@@ -590,7 +590,7 @@ class PrinterInterface(object):
|
||||
raise NotImplementedError()
|
||||
|
||||
|
||||
class PrinterCallback(object):
|
||||
class PrinterCallback:
|
||||
def on_printer_add_log(self, data):
|
||||
"""
|
||||
Called when the :class:`PrinterInterface` receives a new communication log entry from the communication layer.
|
||||
|
||||
@@ -6,7 +6,7 @@ __copyright__ = "Copyright (C) 2014 The OctoPrint Project - Released under terms
|
||||
from octoprint.settings import settings
|
||||
|
||||
|
||||
class PrintTimeEstimator(object):
|
||||
class PrintTimeEstimator:
|
||||
"""
|
||||
Estimator implementation.
|
||||
|
||||
@@ -165,7 +165,7 @@ class PrintTimeEstimator(object):
|
||||
return self._data.update(printTime / progress)
|
||||
|
||||
|
||||
class TimeEstimationHelper(object):
|
||||
class TimeEstimationHelper:
|
||||
|
||||
STABLE_THRESHOLD = 0.1
|
||||
STABLE_COUNTDOWN = 250
|
||||
|
||||
@@ -170,7 +170,7 @@ class InvalidProfileError(Exception):
|
||||
"""Profile invalid"""
|
||||
pass
|
||||
|
||||
class BedFormFactor(object):
|
||||
class BedFormFactor:
|
||||
"""Valid values for bed form factor"""
|
||||
|
||||
RECTANGULAR = "rectangular"
|
||||
@@ -186,7 +186,7 @@ class BedFormFactor(object):
|
||||
BedTypes = BedFormFactor
|
||||
"""Deprecated name of :class:`BedFormFactors`"""
|
||||
|
||||
class BedOrigin(object):
|
||||
class BedOrigin:
|
||||
"""Valid values for bed origin"""
|
||||
|
||||
LOWERLEFT = "lowerleft"
|
||||
@@ -199,7 +199,7 @@ class BedOrigin(object):
|
||||
def values(cls):
|
||||
return [getattr(cls, name) for name in cls.__dict__ if not (name.startswith("__") or name == "values")]
|
||||
|
||||
class PrinterProfileManager(object):
|
||||
class PrinterProfileManager:
|
||||
"""
|
||||
Manager for printer profiles. Offers methods to select the globally used printer profile and to list, add, remove,
|
||||
load and save printer profiles.
|
||||
|
||||
@@ -1448,7 +1448,7 @@ class Printer(PrinterInterface, comm.MachineComPrintCallback):
|
||||
return result
|
||||
|
||||
|
||||
class StateMonitor(object):
|
||||
class StateMonitor:
|
||||
def __init__(self, interval=0.5, on_update=None, on_add_temperature=None, on_add_log=None, on_add_message=None, on_get_progress=None):
|
||||
self._interval = interval
|
||||
self._update_callback = on_update
|
||||
|
||||
@@ -183,7 +183,7 @@ def unauthorized_user():
|
||||
#~~ startup code
|
||||
|
||||
|
||||
class Server(object):
|
||||
class Server:
|
||||
def __init__(self, settings=None, plugin_manager=None, connectivity_checker=None, environment_detector=None,
|
||||
event_manager=None, host=None, port=None, v6_only=False, debug=False, safe_mode=False, allow_root=False,
|
||||
octoprint_daemon=None):
|
||||
@@ -2027,7 +2027,7 @@ class Server(object):
|
||||
pass_number += 1
|
||||
|
||||
|
||||
class LifecycleManager(object):
|
||||
class LifecycleManager:
|
||||
def __init__(self, plugin_manager):
|
||||
self._plugin_manager = plugin_manager
|
||||
|
||||
|
||||
@@ -401,7 +401,7 @@ def _test_url(data):
|
||||
import requests
|
||||
from octoprint import util as util
|
||||
|
||||
class StatusCodeRange(object):
|
||||
class StatusCodeRange:
|
||||
def __init__(self, start=None, end=None):
|
||||
self.start = start
|
||||
self.end = end
|
||||
|
||||
@@ -268,7 +268,7 @@ def fix_flask_jsonify():
|
||||
|
||||
#~~ WSGI environment wrapper for reverse proxying
|
||||
|
||||
class ReverseProxiedEnvironment(object):
|
||||
class ReverseProxiedEnvironment:
|
||||
|
||||
@staticmethod
|
||||
def to_header_candidates(values):
|
||||
@@ -813,7 +813,7 @@ def cache_check_status_code(response, valid):
|
||||
else:
|
||||
return response.status_code not in valid
|
||||
|
||||
class PreemptiveCache(object):
|
||||
class PreemptiveCache:
|
||||
|
||||
def __init__(self, cachefile):
|
||||
self.cachefile = cachefile
|
||||
|
||||
@@ -594,7 +594,7 @@ def _extended_header_value(value):
|
||||
return octoprint.util.to_unicode(_strip_value_quotes(value), encoding="utf-8")
|
||||
|
||||
|
||||
class WsgiInputContainer(object):
|
||||
class WsgiInputContainer:
|
||||
"""
|
||||
A WSGI container for use with Tornado that allows supplying the request body to be used for ``wsgi.input`` in the
|
||||
generated WSGI environment upon call.
|
||||
|
||||
@@ -537,7 +537,7 @@ class HierarchicalChainMap(ChainMap):
|
||||
return cls._hierarchy_for_key(key, node)
|
||||
|
||||
|
||||
class Settings(object):
|
||||
class Settings:
|
||||
"""
|
||||
The :class:`Settings` class allows managing all of OctoPrint's settings. It takes care of initializing the settings
|
||||
directory, loading the configuration from ``config.yaml``, persisting changes to disk etc and provides access
|
||||
|
||||
@@ -34,7 +34,7 @@ from .exceptions import UnknownSlicer, SlicerNotConfigured, SlicingCancelled, \
|
||||
ProfileAlreadyExists, ProfileException, CouldNotDeleteProfile, UnknownProfile
|
||||
|
||||
|
||||
class SlicingProfile(object):
|
||||
class SlicingProfile:
|
||||
"""
|
||||
A wrapper for slicing profiles, both meta data and actual profile data.
|
||||
|
||||
@@ -56,7 +56,7 @@ class SlicingProfile(object):
|
||||
self.default = default
|
||||
|
||||
|
||||
class TemporaryProfile(object):
|
||||
class TemporaryProfile:
|
||||
"""
|
||||
A wrapper for a temporary slicing profile to be used for a slicing job, based on a :class:`SlicingProfile` with
|
||||
optional ``overrides`` applied through the supplied ``save_profile`` method.
|
||||
@@ -100,7 +100,7 @@ class TemporaryProfile(object):
|
||||
pass
|
||||
|
||||
|
||||
class SlicingManager(object):
|
||||
class SlicingManager:
|
||||
"""
|
||||
The :class:`SlicingManager` is responsible for managing available slicers and slicing profiles.
|
||||
|
||||
|
||||
@@ -388,7 +388,7 @@ def configure_timelapse(config=None, persist=False):
|
||||
settings().save()
|
||||
|
||||
|
||||
class Timelapse(object):
|
||||
class Timelapse:
|
||||
QUEUE_ENTRY_TYPE_CAPTURE = "capture"
|
||||
QUEUE_ENTRY_TYPE_CALLBACK = "callback"
|
||||
|
||||
@@ -803,7 +803,7 @@ class TimedTimelapse(Timelapse):
|
||||
self._timer = None
|
||||
|
||||
|
||||
class TimelapseRenderJob(object):
|
||||
class TimelapseRenderJob:
|
||||
|
||||
render_job_lock = threading.RLock()
|
||||
|
||||
|
||||
@@ -1016,7 +1016,7 @@ class DefaultOrderedDict(collections.OrderedDict):
|
||||
collections.OrderedDict.__repr__(self))
|
||||
|
||||
|
||||
class Object(object):
|
||||
class Object:
|
||||
pass
|
||||
|
||||
|
||||
@@ -1121,7 +1121,7 @@ if hasattr(tempfile, "TemporaryDirectory"):
|
||||
TemporaryDirectory = tempfile.TemporaryDirectory
|
||||
else:
|
||||
# Python 2
|
||||
class TemporaryDirectory(object):
|
||||
class TemporaryDirectory:
|
||||
def __init__(self, suffix='', prefix="tmp", dir=None):
|
||||
self._path = tempfile.mkdtemp(suffix=suffix, prefix=prefix, dir=dir)
|
||||
|
||||
@@ -1492,7 +1492,7 @@ class ResettableTimer(threading.Thread):
|
||||
self.on_reset()
|
||||
|
||||
|
||||
class CountedEvent(object):
|
||||
class CountedEvent:
|
||||
|
||||
def __init__(self, value=0, minimum=0, maximum=None, **kwargs):
|
||||
self._counter = 0
|
||||
@@ -1550,7 +1550,7 @@ class CountedEvent(object):
|
||||
self._event.set()
|
||||
|
||||
|
||||
class InvariantContainer(object):
|
||||
class InvariantContainer:
|
||||
def __init__(self, initial_data=None, guarantee_invariant=None):
|
||||
try:
|
||||
from collections import Iterable
|
||||
|
||||
@@ -265,7 +265,7 @@ gcodeToEvent = {
|
||||
"M81": Events.POWER_OFF,
|
||||
}
|
||||
|
||||
class PositionRecord(object):
|
||||
class PositionRecord:
|
||||
_standard_attrs = {"x", "y", "z", "e", "f", "t"}
|
||||
|
||||
@classmethod
|
||||
@@ -300,7 +300,7 @@ class PositionRecord(object):
|
||||
attrs = self._standard_attrs | set(key for key in dir(self) if self.valid_e(key))
|
||||
return dict((attr, getattr(self, attr)) for attr in attrs)
|
||||
|
||||
class TemperatureRecord(object):
|
||||
class TemperatureRecord:
|
||||
RESERVED_IDENTIFIER_REGEX = re.compile("[0-9]+|[bc]")
|
||||
|
||||
def __init__(self):
|
||||
@@ -387,7 +387,7 @@ class TemperatureRecord(object):
|
||||
else:
|
||||
return actual, target
|
||||
|
||||
class MachineCom(object):
|
||||
class MachineCom:
|
||||
STATE_NONE = 0
|
||||
STATE_OPEN_SERIAL = 1
|
||||
STATE_DETECT_SERIAL = 2
|
||||
@@ -4030,7 +4030,7 @@ class MachineCom(object):
|
||||
|
||||
### MachineCom callback ################################################################################################
|
||||
|
||||
class MachineComPrintCallback(object):
|
||||
class MachineComPrintCallback:
|
||||
def on_comm_log(self, message):
|
||||
pass
|
||||
|
||||
@@ -4099,7 +4099,7 @@ class MachineComPrintCallback(object):
|
||||
|
||||
### Printing file information classes ##################################################################################
|
||||
|
||||
class PrintingFileInformation(object):
|
||||
class PrintingFileInformation:
|
||||
"""
|
||||
Encapsulates information regarding the current file being printed: file name, current position, total size and
|
||||
time the print started.
|
||||
@@ -5081,7 +5081,7 @@ def _normalize_command_handler_result(command, command_type, gcode, subcode, tag
|
||||
return result
|
||||
|
||||
|
||||
class QueueMarker(object):
|
||||
class QueueMarker:
|
||||
|
||||
def __init__(self, callback):
|
||||
self.callback = callback
|
||||
|
||||
@@ -69,7 +69,7 @@ class CommandlineError(Exception):
|
||||
self.stderr = stderr
|
||||
|
||||
|
||||
class CommandlineCaller(object):
|
||||
class CommandlineCaller:
|
||||
"""
|
||||
The CommandlineCaller is a utility class that allows running command line commands while logging their stdout
|
||||
and stderr via configurable callback functions.
|
||||
|
||||
@@ -8,7 +8,7 @@ import time
|
||||
|
||||
from octoprint.util.net import server_reachable, resolve_host
|
||||
|
||||
class ConnectivityChecker(object):
|
||||
class ConnectivityChecker:
|
||||
"""
|
||||
Regularly checks for online connectivity.
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@ import logging
|
||||
import codecs
|
||||
|
||||
|
||||
class Vector3D(object):
|
||||
class Vector3D:
|
||||
"""
|
||||
3D vector value
|
||||
|
||||
@@ -126,7 +126,7 @@ class Vector3D(object):
|
||||
return "Vector3D(x={}, y={}, z={}, length={})".format(self.x, self.y, self.z, self.length)
|
||||
|
||||
|
||||
class MinMax3D(object):
|
||||
class MinMax3D:
|
||||
"""
|
||||
Tracks minimum and maximum of recorded values
|
||||
|
||||
@@ -183,7 +183,7 @@ class AnalysisAborted(Exception):
|
||||
Exception.__init__(self, *args, **kwargs)
|
||||
|
||||
|
||||
class gcode(object):
|
||||
class gcode:
|
||||
def __init__(self, progress_callback=None):
|
||||
self._logger = logging.getLogger(__name__)
|
||||
self.layerList = None
|
||||
|
||||
@@ -223,7 +223,7 @@ class ExceptionHandlerExtension(Extension):
|
||||
trycatch = ExceptionHandlerExtension
|
||||
|
||||
|
||||
class MarkdownFilter(object):
|
||||
class MarkdownFilter:
|
||||
|
||||
def __init__(self, app, **markdown_options):
|
||||
self._markdown_options = markdown_options
|
||||
|
||||
@@ -7,7 +7,7 @@ import frozendict
|
||||
|
||||
from octoprint.util import to_unicode
|
||||
|
||||
class JsonEncoding(object):
|
||||
class JsonEncoding:
|
||||
|
||||
encoders = collections.OrderedDict()
|
||||
|
||||
|
||||
Reference in new issue
Block a user