From 422e3d2b662315c8bf76a685660be6d37bb2796b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gina=20H=C3=A4u=C3=9Fge?= Date: Tue, 24 May 2022 12:25:17 +0200 Subject: [PATCH 01/19] =?UTF-8?q?=F0=9F=94=96=20staging/bugfix=20is=20now?= =?UTF-8?q?=201.8.2.dev?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .versioneer-lookup | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.versioneer-lookup b/.versioneer-lookup index 88c994cb2..306e259e0 100644 --- a/.versioneer-lookup +++ b/.versioneer-lookup @@ -26,8 +26,8 @@ improve/.* 1.8.0 3fe45661cd79c5137d9d4f5f4adb4d9519bc2084 pep440-dev # staging/bugfix is the branch for preparation of the 1.8.1 bugfix release # so are any bug/... branches -staging/bugfix 1.8.1 d2a9aacedacf2b582faca462d6e915f88676a3d5 pep440-dev -bug/.* 1.8.1 d2a9aacedacf2b582faca462d6e915f88676a3d5 pep440-dev +staging/bugfix 1.8.2 260a1aef11432c421246019e25b6b744abbaed60 pep440-dev +bug/.* 1.8.2 260a1aef11432c421246019e25b6b744abbaed60 pep440-dev # staging/maintenance is currently the branch for preparation of 1.8.0rc6 # so is regressionfix/... From 6ee8325f5b23d3bed8074bb2f2914d1af990917f Mon Sep 17 00:00:00 2001 From: Christian Clauss Date: Tue, 2 Aug 2022 15:48:14 +0200 Subject: [PATCH 02/19] =?UTF-8?q?=E2=9C=8F=EF=B8=8F=20Fix=20several=20typo?= =?UTF-8?q?s=20(#4599)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/octoprint/_version.py | 2 +- src/octoprint/plugins/softwareupdate/__init__.py | 4 ++-- src/octoprint/schema/config/devel.py | 2 +- src/octoprint/static/less/bootstrap/forms.less | 2 +- src/octoprint/static/less/bootstrap/navbar.less | 2 +- src/octoprint/static/less/bootstrap/thumbnails.less | 4 ++-- src/octoprint/util/pip.py | 4 ++-- versioneer.py | 4 ++-- 8 files changed, 12 insertions(+), 12 deletions(-) diff --git a/src/octoprint/_version.py b/src/octoprint/_version.py index bff3b84f6..73ee56c6f 100644 --- a/src/octoprint/_version.py +++ b/src/octoprint/_version.py @@ -288,7 +288,7 @@ def git_pieces_from_vcs(tag_prefix, root, verbose, run_command=run_command): # TAG-NUM-gHEX mo = re.search(r"^(.+)-(\d+)-g([0-9a-f]+)$", git_describe) if not mo: - # unparseable. Maybe git-describe is misbehaving? + # unparsable. Maybe git-describe is misbehaving? pieces["error"] = "unable to parse git-describe output: '%s'" % describe_out return pieces diff --git a/src/octoprint/plugins/softwareupdate/__init__.py b/src/octoprint/plugins/softwareupdate/__init__.py index 90bf8fe54..79fe04e1a 100644 --- a/src/octoprint/plugins/softwareupdate/__init__.py +++ b/src/octoprint/plugins/softwareupdate/__init__.py @@ -2426,11 +2426,11 @@ class SoftwareUpdatePlugin( ) if check.get("update_script", None): - # we force an exact version & python unequality check, to be able to downgrade + # we force an exact version & python inequality check, to be able to downgrade result["force_exact_version"] = True result["release_compare"] = "python_unequal" elif check.get("pip", None): - # we force python unequality check for pip installs, to be able to downgrade + # we force python inequality check for pip installs, to be able to downgrade result["release_compare"] = "python_unequal" if result.get("pip", None): diff --git a/src/octoprint/schema/config/devel.py b/src/octoprint/schema/config/devel.py index c14f8ee9e..e2e34bb6b 100644 --- a/src/octoprint/schema/config/devel.py +++ b/src/octoprint/schema/config/devel.py @@ -29,7 +29,7 @@ class DevelWebassetsConfig(BaseModel): class DevelCacheConfig(BaseModel): enabled: bool = True - """Whether to enable caching. Defaults to true. Setting it to false will cause the UI to alway be fully rerendered on request to `/` on the server.""" + """Whether to enable caching. Defaults to true. Setting it to false will cause the UI to always be fully rerendered on request to `/` on the server.""" preemptive: bool = True """Whether to enable the preemptive cache.""" diff --git a/src/octoprint/static/less/bootstrap/forms.less b/src/octoprint/static/less/bootstrap/forms.less index 330ed3d68..34a667da6 100644 --- a/src/octoprint/static/less/bootstrap/forms.less +++ b/src/octoprint/static/less/bootstrap/forms.less @@ -316,7 +316,7 @@ textarea[class*="span"], .row-fluid .controls-row [class*="span"] { float: left; } -// Explicity set top padding on all checkboxes/radios, not just first-child +// Explicitly set top padding on all checkboxes/radios, not just first-child .controls-row .checkbox[class*="span"], .controls-row .radio[class*="span"] { padding-top: 5px; diff --git a/src/octoprint/static/less/bootstrap/navbar.less b/src/octoprint/static/less/bootstrap/navbar.less index b31cf155b..fae29b27e 100644 --- a/src/octoprint/static/less/bootstrap/navbar.less +++ b/src/octoprint/static/less/bootstrap/navbar.less @@ -127,7 +127,7 @@ .input-append, .input-prepend { margin-top: 5px; - white-space: nowrap; // preven two items from separating within a .navbar-form that has .pull-left + white-space: nowrap; // prevent two items from separating within a .navbar-form that has .pull-left input { margin-top: 0; // remove the margin on top since it's on the parent } diff --git a/src/octoprint/static/less/bootstrap/thumbnails.less b/src/octoprint/static/less/bootstrap/thumbnails.less index 0e3d112e3..ef07a1403 100644 --- a/src/octoprint/static/less/bootstrap/thumbnails.less +++ b/src/octoprint/static/less/bootstrap/thumbnails.less @@ -2,7 +2,7 @@ // Thumbnails // -------------------------------------------------- -// Note: `.thumbnails` and `.thumbnails > li` are overriden in responsive files +// Note: `.thumbnails` and `.thumbnails > li` are overridden in responsive files // Make wrapper ul behave like the grid .thumbnails { @@ -17,7 +17,7 @@ // Float li to make thumbnails appear in a row .thumbnails > li { - float: left; // Explicity set the float since we don't require .span* classes + float: left; // Explicitly set the float since we don't require .span* classes margin-bottom: @baseLineHeight; margin-left: @gridGutterWidth; } diff --git a/src/octoprint/util/pip.py b/src/octoprint/util/pip.py index ff25391e1..205185c27 100644 --- a/src/octoprint/util/pip.py +++ b/src/octoprint/util/pip.py @@ -473,7 +473,7 @@ class PipCaller(CommandlineCaller): if not output.startswith("pip"): self._logger.warning( - "pip command returned unparseable output, can't determine version: {}".format( + "pip command returned unparsable output, can't determine version: {}".format( output ) ) @@ -481,7 +481,7 @@ class PipCaller(CommandlineCaller): split_output = list(map(lambda x: x.strip(), output.split())) if len(split_output) < 2: self._logger.warning( - "pip command returned unparseable output, can't determine version: {}".format( + "pip command returned unparsable output, can't determine version: {}".format( output ) ) diff --git a/versioneer.py b/versioneer.py index 5f30d824f..5cd5a6265 100644 --- a/versioneer.py +++ b/versioneer.py @@ -795,7 +795,7 @@ def git_pieces_from_vcs(tag_prefix, root, verbose, run_command=run_command): # TAG-NUM-gHEX mo = re.search(r'^(.+)-(\\d+)-g([0-9a-f]+)$', git_describe) if not mo: - # unparseable. Maybe git-describe is misbehaving? + # unparsable. Maybe git-describe is misbehaving? pieces["error"] = ("unable to parse git-describe output: '%%s'" %% describe_out) return pieces @@ -1384,7 +1384,7 @@ def git_pieces_from_vcs(tag_prefix, root, verbose, run_command=run_command): # TAG-NUM-gHEX mo = re.search(r"^(.+)-(\d+)-g([0-9a-f]+)$", git_describe) if not mo: - # unparseable. Maybe git-describe is misbehaving? + # unparsable. Maybe git-describe is misbehaving? pieces["error"] = "unable to parse git-describe output: '%s'" % describe_out return pieces From 41b003b2f39a857d7a19f955188aa294c588fbe4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gina=20H=C3=A4u=C3=9Fge?= Date: Tue, 2 Aug 2022 16:23:24 +0200 Subject: [PATCH 03/19] =?UTF-8?q?=E2=AC=86=EF=B8=8F=20Allow=20ES6=20code?= =?UTF-8?q?=20in=20JS=20files?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Less than 1% of (tracked) OctoPrint client loads happen in browsers that are still stuck on ES5. So let's get rid of the ES5 limitation and make life easier for anyone working on OctoPrint's JS code. As a test of the eslint config, login.js and recovery.js have been switched to the use of arrow functions. Implements #4562 --- .eslintrc.yaml | 30 ++-------- .pre-commit-config.yaml | 1 - src/octoprint/static/js/login/login.js | 10 ++-- src/octoprint/static/js/recovery/recovery.js | 60 ++++++++++---------- 4 files changed, 40 insertions(+), 61 deletions(-) diff --git a/.eslintrc.yaml b/.eslintrc.yaml index c34fe2339..fae38e122 100644 --- a/.eslintrc.yaml +++ b/.eslintrc.yaml @@ -1,31 +1,14 @@ +parserOptions: + ecmaVersion: 2018 + overrides: - files: - - "src/octoprint/static/js/app/**" + - "src/octoprint/static/js/**.js" + - "src/octoprint/plugins/**.js" env: browser: true jquery: true - parserOptions: - ecmaVersion: 5 - rules: - es5/no-arrow-functions: error - es5/no-binary-and-octal-literals: error - es5/no-block-scoping: error - es5/no-classes: error - es5/no-computed-properties: error - es5/no-default-parameters: error - es5/no-destructuring: error - es5/no-exponentiation-operator: error - es5/no-for-of: error - es5/no-generators: error - es5/no-modules: error - es5/no-object-super: error - es5/no-rest-parameters: error - es5/no-shorthand-properties: error - es5/no-spread: error - es5/no-template-literals: error - es5/no-typeof-symbol: error - es5/no-unicode-code-point-escape: error - es5/no-unicode-regex: error + es6: true - files: - "tests/cypress/**" env: @@ -36,5 +19,4 @@ overrides: - "plugin:cypress/recommended" plugins: - - eslint-plugin-es5 - cypress diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 53a20b5a6..0473115c8 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -64,7 +64,6 @@ repos: - id: eslint additional_dependencies: - eslint@7.19.0 - - eslint-plugin-es5@v1.3.0 - eslint-plugin-cypress@2.11.2 files: \.js$ exclude: ^(src/octoprint/vendor/|tests/static/js/lib|tests/util/_files|docs/|scripts/|translations/) diff --git a/src/octoprint/static/js/login/login.js b/src/octoprint/static/js/login/login.js index 61a881723..c9107d2cf 100644 --- a/src/octoprint/static/js/login/login.js +++ b/src/octoprint/static/js/login/login.js @@ -32,11 +32,11 @@ $(function () { OctoPrint.browser .login(username, password, remember) - .done(function () { + .done(() => { ignoreDisconnect = true; window.location.href = REDIRECT_URL; }) - .fail(function () { + .fail(() => { usernameElement.val(USER_ID); passwordElement.val(""); @@ -55,18 +55,18 @@ $(function () { OctoPrint.options.baseurl = BASE_URL; - OctoPrint.socket.onConnected = function () { + OctoPrint.socket.onConnected = () => { buttonElement.prop("disabled", false); offlineElement.removeClass("in"); }; - OctoPrint.socket.onDisconnected = function () { + OctoPrint.socket.onDisconnected = () => { if (ignoreDisconnect) return; buttonElement.prop("disabled", true); offlineElement.addClass("in"); }; - reconnectElement.click(function () { + reconnectElement.click(() => { OctoPrint.socket.reconnect(); }); diff --git a/src/octoprint/static/js/recovery/recovery.js b/src/octoprint/static/js/recovery/recovery.js index 1ce4cbc6e..414dc81ca 100644 --- a/src/octoprint/static/js/recovery/recovery.js +++ b/src/octoprint/static/js/recovery/recovery.js @@ -54,7 +54,7 @@ $(function () { self.backups = ko.observableArray([]); self.excludeFromBackup = ko.observableArray([]); self.backupMaxUploadSize = ko.observable(); - self.backupIsAboveUploadSize = function (data) { + self.backupIsAboveUploadSize = (data) => { return data.size > self.backupMaxUploadSize(); }; @@ -64,8 +64,8 @@ $(function () { self.workLoglines = ko.observableArray([]); self.workTitle = ko.observable(""); - self.request = function () { - OctoPrint.browser.passiveLogin().done(function (resp) { + self.request = () => { + OctoPrint.browser.passiveLogin().done((resp) => { self.username(resp.name); self.permitted(_.includes(resp.needs.role, "admin")); self.known(true); @@ -73,13 +73,13 @@ $(function () { OctoPrint.socket.sendAuth(resp.name, resp.session); }); - OctoPrint.system.getCommandsForSource("core").done(function (resp) { + OctoPrint.system.getCommandsForSource("core").done((resp) => { self.systemCommands(resp); }); - OctoPrint.system.getInfo().done(function (resp) { + OctoPrint.system.getInfo().done((resp) => { var systeminfo = []; - _.forOwn(resp.systeminfo, function (value, key) { + _.forOwn(resp.systeminfo, (value, key) => { systeminfo.push({key: key, value: value}); }); self.systemInfo(systeminfo); @@ -87,25 +87,23 @@ $(function () { OctoPrint.printer .getFullState() - .done(function (resp) { + .done((resp) => { self.printerConnected(true); self.jobInProgress(resp.state.flags.printing); }) - .fail(function (xhr) { + .fail((xhr) => { self.printerConnected(false); self.jobInProgress(false); }); if (OctoPrint.plugins.backup) { - OctoPrint.plugins.backup.get().done(function (resp) { + OctoPrint.plugins.backup.get().done((resp) => { self.backupSupported(true); self.restoreSupported(resp.restore_supported); self.backupMaxUploadSize(resp.max_upload_size); var backups = resp.backups; - backups.sort(function (a, b) { - return b.date - a.date; - }); + backups.sort((a, b) => b.date - a.date); self.backups(backups); }); } else { @@ -115,15 +113,15 @@ $(function () { } }; - self.executeSystemCommand = function (command) { - var process = function () { + self.executeSystemCommand = (command) => { + var process = () => { OctoPrint.system.executeCommand(command.source, command.action); }; if (command.confirm) { showConfirmationDialog({ message: command.confirm, - onproceed: function () { + onproceed: () => { process(); } }); @@ -132,22 +130,22 @@ $(function () { } }; - self.copySystemInfo = function () { + self.copySystemInfo = () => { var text = ""; - _.each(self.systemInfo(), function (entry) { + _.each(self.systemInfo(), (entry) => { text += entry.key + ": " + entry.value + "\r\n"; }); copyToClipboard(text); }; self.cancelPrint = function () { - OctoPrint.job.cancel().done(function () { + OctoPrint.job.cancel().done(() => { self.request(); }); }; self.disconnectPrinter = function () { - OctoPrint.connection.disconnect().done(function () { + OctoPrint.connection.disconnect().done(() => { self.request(); }); }; @@ -160,15 +158,15 @@ $(function () { if (!self.backupSupported()) return; var excluded = self.excludeFromBackup(); - OctoPrint.plugins.backup.createBackup(excluded).done(function () { + OctoPrint.plugins.backup.createBackup(excluded).done(() => { self.excludeFromBackup([]); }); }; - self.restoreBackup = function (backup) { + self.restoreBackup = (backup) => { if (!self.restoreSupported()) return; - var perform = function () { + var perform = () => { self.workInProgress(true); self.workTitle(gettext("Restoring backup...")); self.workLoglines.removeAll(); @@ -192,26 +190,26 @@ $(function () { ); }; - self.logout = function () { - OctoPrint.browser.logout().done(function () { + self.logout = () => { + OctoPrint.browser.logout().done(() => { window.location.href = LOGIN_URL; }); }; - self.reconnect = function () { + self.reconnect = () => { OctoPrint.socket.reconnect(); }; - self.onSocketConnected = function () { + self.onSocketConnected = () => { self.connected(true); self.request(); }; - self.onSocketDisconnected = function () { + self.onSocketDisconnected = () => { self.connected(false); }; - self.onSocketMessage = function (event, data) { + self.onSocketMessage = (event, data) => { console.log("onSocketMessage", event, data); if (event === "plugin" && data.plugin === "backup") { switch (data.data.type) { @@ -302,15 +300,15 @@ $(function () { var viewModel = new RecoveryViewModel(); - OctoPrint.socket.onConnected = function () { + OctoPrint.socket.onConnected = () => { viewModel.onSocketConnected(); }; - OctoPrint.socket.onDisconnected = function () { + OctoPrint.socket.onDisconnected = () => { viewModel.onSocketDisconnected(); }; - OctoPrint.socket.onMessage("*", function (data) { + OctoPrint.socket.onMessage("*", (data) => { viewModel.onSocketMessage(data.event, data.data); }); From a2c0323f395f5ef2e99894fdc3f57314b9bd3c94 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gina=20H=C3=A4u=C3=9Fge?= Date: Wed, 3 Aug 2022 10:46:14 +0200 Subject: [PATCH 04/19] =?UTF-8?q?=F0=9F=91=B7=20Add=20codespell=20to=20pre?= =?UTF-8?q?-commit?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit As suggested in #4603 --- .codespell_ignore_words | 4 ++++ .pre-commit-config.yaml | 4 ++++ setup.cfg | 6 ++++++ 3 files changed, 14 insertions(+) create mode 100644 .codespell_ignore_words diff --git a/.codespell_ignore_words b/.codespell_ignore_words new file mode 100644 index 000000000..ff8047339 --- /dev/null +++ b/.codespell_ignore_words @@ -0,0 +1,4 @@ +managable +commitish +matchs +medias diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 0473115c8..9118506e9 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -67,3 +67,7 @@ repos: - eslint-plugin-cypress@2.11.2 files: \.js$ exclude: ^(src/octoprint/vendor/|tests/static/js/lib|tests/util/_files|docs/|scripts/|translations/) + - repo: https://github.com/codespell-project/codespell + rev: v2.1.0 + hooks: + - id: codespell diff --git a/setup.cfg b/setup.cfg index 4b5d8f589..552e134b7 100644 --- a/setup.cfg +++ b/setup.cfg @@ -33,3 +33,9 @@ known_first_party = octoprint octoprint_setuptools octoprint_client + +[codespell] +skip = *.po,*.min.js,.git,*/vendor,*/lib,*/bootstrap,*/node_modules,*/translations,*/venv*,*/.*,*/build,*/_build,setup.cfg,AUTHORS.md +ignore-words = .codespell_ignore_words +quiet-level = 3 +count = From 75cb5930acb90cfd555abf9261f86560fdbf9b63 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gina=20H=C3=A4u=C3=9Fge?= Date: Wed, 3 Aug 2022 11:37:51 +0200 Subject: [PATCH 05/19] =?UTF-8?q?=F0=9F=91=B7=20Don't=20exclude=20docs=20f?= =?UTF-8?q?older=20from=20pre-commit?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .pre-commit-config.yaml | 3 ++- docs/api/files.rst | 1 - docs/api/printerprofiles.rst | 1 - docs/api/timelapse.rst | 3 +-- docs/conf.py | 11 +++++------ docs/configuration/config_yaml.rst | 2 +- docs/configuration/yaml.rst | 2 +- docs/development/environment.rst | 2 -- docs/development/virtual_printer.rst | 10 +++++----- docs/events/index.rst | 1 - docs/images/template_plugin_types.ep | 2 +- docs/index.rst | 1 - docs/jsclientlib/control.rst | 1 - docs/jsclientlib/job.rst | 1 - docs/modules/filemanager.rst | 2 +- docs/modules/server.rst | 3 --- docs/modules/users.rst | 2 -- docs/plugins/distributing.rst | 18 +++++++++--------- docs/plugins/helpers.rst | 1 - docs/plugins/injectedproperties.rst | 1 - docs/plugins/python3_migration.rst | 2 -- docs/sphinxext/codeblockext.py | 24 ++++++++++-------------- docs/sphinxext/onlineinclude.py | 15 +++++++-------- 23 files changed, 43 insertions(+), 66 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 9118506e9..c26984a43 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,4 +1,4 @@ -exclude: ^(src/octoprint/vendor/|src/octoprint/static/js/lib|src/octoprint/static/vendor|tests/static/js/lib|tests/util/_files|docs/|scripts/|translations/|.*\.css|.*\.svg) +exclude: ^(src/octoprint/vendor/|src/octoprint/static/js/lib|src/octoprint/static/vendor|tests/static/js/lib|tests/util/_files|scripts/|translations/|.*\.css|.*\.svg) repos: - repo: https://github.com/pre-commit/pre-commit-hooks rev: v4.1.0 @@ -54,6 +54,7 @@ repos: - id: flake8 additional_dependencies: - flake8-bugbear==22.3.20 + exclude: ^(docs/) - repo: https://github.com/pre-commit/mirrors-prettier rev: v2.5.1 hooks: diff --git a/docs/api/files.rst b/docs/api/files.rst index 1cf439741..81367e82a 100644 --- a/docs/api/files.rst +++ b/docs/api/files.rst @@ -908,4 +908,3 @@ Upload response - (File only) Whether the file that was just uploaded was started to print (``true``) or not (``false``). If this is ``false`` but was requested to be ``true`` in the upload request, the user lacked permissions, the printer was not operational or already printing and thus the request could not be fulfilled. - diff --git a/docs/api/printerprofiles.rst b/docs/api/printerprofiles.rst index 8b802b37d..d856b4523 100644 --- a/docs/api/printerprofiles.rst +++ b/docs/api/printerprofiles.rst @@ -644,4 +644,3 @@ Profile - Tuple of (x, y) values describing the offsets of the other extruders relative to the first extruder. E.g. for a printer with two extruders, if the second extruder is offset by 20mm in the X and 25mm in the Y direction, this array will read ``[ [0.0, 0.0], [20.0, 25.0] ]`` - diff --git a/docs/api/timelapse.rst b/docs/api/timelapse.rst index e739b43ee..6a49a631d 100644 --- a/docs/api/timelapse.rst +++ b/docs/api/timelapse.rst @@ -30,7 +30,7 @@ Delete a timelapse .. http:delete:: /api/timelapse/(string:name) Delete the timelapse ``name``. - + Returns a :ref:`timelapse list ` in the response body with the updated information. @@ -283,4 +283,3 @@ For timelapse type ``timed``. - 1 - int - Seconds between individual shots - diff --git a/docs/conf.py b/docs/conf.py index 47aec5277..9c1603677 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -1,6 +1,3 @@ -# -*- coding: utf-8 -*- -from __future__ import absolute_import, division, print_function, unicode_literals - # # OctoPrint documentation build configuration file, created by # sphinx-quickstart on Mon Dec 02 17:08:50 2013. @@ -13,7 +10,8 @@ from __future__ import absolute_import, division, print_function, unicode_litera # All configuration values have a default; values that are commented out # serve to show the default. -import sys, os +import os +import sys # If extensions (or modules to document with autodoc) are in another directory, # add these directories to sys.path here. If the directory is relative to the @@ -21,9 +19,10 @@ import sys, os sys.path.insert(0, os.path.abspath("../src/")) sys.path.append(os.path.abspath("sphinxext")) -import octoprint._version from datetime import date +import octoprint._version + year_since = 2013 year_current = date.today().year @@ -43,7 +42,7 @@ extensions = [ "sphinx.ext.napoleon", "sphinxcontrib.mermaid", "sphinx.ext.intersphinx", - "sphinx_rtd_theme" + "sphinx_rtd_theme", ] todo_include_todos = True intersphinx_mapping = { diff --git a/docs/configuration/config_yaml.rst b/docs/configuration/config_yaml.rst index e1c126dcb..0ba63e0bf 100644 --- a/docs/configuration/config_yaml.rst +++ b/docs/configuration/config_yaml.rst @@ -451,7 +451,7 @@ Use the following settings to enable or disable OctoPrint features: # whether G90/G91 also influence absolute/relative mode of extruders g90InfluencesExtruder: false - + # Replace all special characters and spaces with text equivalent to make them universally compatible. # Most OS filesystems work fine with unicode characters, but just in case you can revert to the # older behaviour by setting this to true. diff --git a/docs/configuration/yaml.rst b/docs/configuration/yaml.rst index b7b4e56af..e472dda45 100644 --- a/docs/configuration/yaml.rst +++ b/docs/configuration/yaml.rst @@ -221,4 +221,4 @@ clearer (whitespace again made visible to help track indentation): Just make sure you follow a consistent way of indenting your files -- YAML is not as strict as Python when it comes to differing indentation variants within the same file (as long as it's still valid), but consistency will help you as a lot as a human. Ideally you'll use a text editor which highlights white space characters for you (most editors can -be configured this way), this will help tremendously when editing whitespace sensitive syntax such as YAML. \ No newline at end of file +be configured this way), this will help tremendously when editing whitespace sensitive syntax such as YAML. diff --git a/docs/development/environment.rst b/docs/development/environment.rst index f8c27daef..b6d62c708 100644 --- a/docs/development/environment.rst +++ b/docs/development/environment.rst @@ -405,5 +405,3 @@ Visual Studio Code (vscode) * Saving a file will run an auto formatter and import sort * ``Ctrl+Shift+B`` can be used to run the ``build docs`` task to rebuild the documentation - - diff --git a/docs/development/virtual_printer.rst b/docs/development/virtual_printer.rst index f0d96138f..a17f2a513 100644 --- a/docs/development/virtual_printer.rst +++ b/docs/development/virtual_printer.rst @@ -200,29 +200,29 @@ There many configuration options via ``config.yaml`` for the virtual printer tha # Simulated ambient temperature in °C ambientTemperature: 21.3 - + # Response to M105 when there is a target # Placeholders: # - heater: The heater id (eg. T0, T1, B) # - actual: The actual temperature of the heater # - target: The target temperature of heater m105TargetFormatString: {heater}:{actual:.2f}/ {target:.2f} - + # Response to M105 when there is no target # Placeholders: # - heater: The heater id (eg. T0, T1, B) # - actual: The actual temperature of the heater m105NoTargetFormatString: {heater}:{actual:.2f} - + # Enable virtual EEPROM # If enabled, a file `eeprom.json` will be created in the plugin data folder # to enable settings persistence across connections. Enables M500/1/2/4 commands # And a selection of other settings commands. Responses modeled on Marlin 2.0 enable_eeprom: true - + # Support M503 support_m503: true - + # Resend ratio to simulate noise on the line resend_ratio: 0 diff --git a/docs/events/index.rst b/docs/events/index.rst index c468a1fad..a3188bd3a 100644 --- a/docs/events/index.rst +++ b/docs/events/index.rst @@ -870,4 +870,3 @@ PrinterProfileModified * ``identifier``: the identifier of the modified printer profile .. versionadded:: 1.3.12 - diff --git a/docs/images/template_plugin_types.ep b/docs/images/template_plugin_types.ep index d036b24cc..f56ea6fd3 100644 --- a/docs/images/template_plugin_types.ep +++ b/docs/images/template_plugin_types.ep @@ -306,4 +306,4 @@