diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index d14d78712..94bea85be 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -52,7 +52,7 @@ repos: hooks: - id: flake8 additional_dependencies: - - flake8-bugbear + - flake8-bugbear==22.3.20 - repo: https://github.com/pre-commit/mirrors-prettier rev: v2.5.1 hooks: diff --git a/AUTHORS.md b/AUTHORS.md index 3ccdb7dde..b33aad895 100644 --- a/AUTHORS.md +++ b/AUTHORS.md @@ -165,6 +165,7 @@ date of first contribution): * [Shell M. Shrader](https://github.com/synman) * [Johan Verrept](https://github.com/JoveToo) * [Nicu Surdu](https://github.com/surdu) + * [Zack Lewis](https://github.com/lima3w) OctoPrint started off as a fork of [Cura](https://github.com/daid/Cura) by [Daid Braam](https://github.com/daid). Parts of its communication layer and diff --git a/docs/bundledplugins/softwareupdate.rst b/docs/bundledplugins/softwareupdate.rst index 78cf9de0c..3b9bb099e 100644 --- a/docs/bundledplugins/softwareupdate.rst +++ b/docs/bundledplugins/softwareupdate.rst @@ -560,7 +560,7 @@ Global credentials .. versionadded:: 1.5.0 -Starting with OctoPrint 1.5.0, the Software Update Plugin supports supplyting a GitHub +Starting with OctoPrint 1.5.0, the Software Update Plugin supports supplying a GitHub API token to use for the ``github_release`` and ``github_commit`` version check types, to work around possible rate limit problems if a lot of checks are to be made from a single external IP. You may create a `personal access token `_ diff --git a/src/octoprint/plugin/types.py b/src/octoprint/plugin/types.py index b43982670..b5e7979c1 100644 --- a/src/octoprint/plugin/types.py +++ b/src/octoprint/plugin/types.py @@ -1428,7 +1428,7 @@ class BlueprintPlugin(OctoPrintPlugin, RestartNeedingPlugin): # we now iterate over all members of ourselves and look if we find an attribute # that has data originating from one of our decorators - we ignore anything # starting with a _ to only handle public stuff - for member in [member for member in dir(self) if not member.startswith("_")]: + for member in [x for x in dir(self) if not x.startswith("_")]: f = getattr(self, member) if hasattr(f, "_blueprint_rules") and member in f._blueprint_rules: diff --git a/src/octoprint/plugins/gcodeviewer/static/js/viewer/renderer.js b/src/octoprint/plugins/gcodeviewer/static/js/viewer/renderer.js index f09c5d360..317e33da1 100644 --- a/src/octoprint/plugins/gcodeviewer/static/js/viewer/renderer.js +++ b/src/octoprint/plugins/gcodeviewer/static/js/viewer/renderer.js @@ -1042,7 +1042,14 @@ GCODE.renderer = (function () { if (renderOptions["showMoves"] && !isNotCurrentLayer) { // move => draw line from (prevX, prevY) to (x, y) in move color ctx.lineWidth = lineWidthFactor; - ctx.lineTo(x, y); + + if (cmd.direction !== undefined && cmd.direction !== 0) { + var arc = getArcParams(cmd); + var ccw = cmd.direction < 0; // Y-axis is inverted so direction is also inverted + ctx.arc(arc.x, arc.y, arc.r, arc.startAngle, arc.endAngle, ccw); + } else { + ctx.lineTo(x, y); + } } } else if (cmd.extrude) { if (cmd.retract == 0) { diff --git a/src/octoprint/plugins/gcodeviewer/static/js/viewer/worker.js b/src/octoprint/plugins/gcodeviewer/static/js/viewer/worker.js index e0d4a6567..02492cfa1 100644 --- a/src/octoprint/plugins/gcodeviewer/static/js/viewer/worker.js +++ b/src/octoprint/plugins/gcodeviewer/static/js/viewer/worker.js @@ -709,12 +709,17 @@ var doParse = function () { } if (sendMultiLayer.indexOf(sendLayer) === -1) { - sendMultiLayer[sendMultiLayer.length] = sendLayer; + sendMultiLayer.push(sendLayer); } sendLayer = undefined; } } + + // we are done, send the final layer + if (sendMultiLayer.indexOf(activeLayer) === -1) { + sendMultiLayer.push(activeLayer); + } sendLayersToParent(sendMultiLayer, 100); }; diff --git a/src/octoprint/server/views.py b/src/octoprint/server/views.py index 235e15f01..26e31ae17 100644 --- a/src/octoprint/server/views.py +++ b/src/octoprint/server/views.py @@ -150,9 +150,9 @@ def _valid_status_for_cache(status_code): return 200 <= status_code < 400 -def _add_additional_assets(hook): +def _add_additional_assets(hook_name): result = [] - for name, hook in pluginManager.get_hooks(hook).items(): + for name, hook in pluginManager.get_hooks(hook_name).items(): try: assets = hook() if isinstance(assets, (tuple, list)): diff --git a/src/octoprint/static/js/app/viewmodels/connection.js b/src/octoprint/static/js/app/viewmodels/connection.js index 1bd6b0d98..664c30918 100644 --- a/src/octoprint/static/js/app/viewmodels/connection.js +++ b/src/octoprint/static/js/app/viewmodels/connection.js @@ -40,7 +40,8 @@ $(function () { self.isLoading = ko.observable(undefined); self.enableConnect = ko.pureComputed(function () { - return self.enablePort() || !self.isErrorOrClosed(); + //return self.enablePort() || !self.isErrorOrClosed(); + return true; // enable always for now, until we have an auto refresh in 1.9.0 }); self.buttonText = ko.pureComputed(function () { diff --git a/src/octoprint/util/comm.py b/src/octoprint/util/comm.py index 2abb570eb..efdb79b07 100644 --- a/src/octoprint/util/comm.py +++ b/src/octoprint/util/comm.py @@ -2590,7 +2590,7 @@ class MachineCom: ) for key in [ - key for key in parsed if key.startswith("e") and len(key) > 1 + x for x in parsed if x.startswith("e") and len(x) > 1 ]: setattr(self.last_position, key, parsed.get(key))