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 @@