From e72a79622f4c5a975e433eec3c6ff5cf20316a98 Mon Sep 17 00:00:00 2001 From: Josef Prochazka Date: Tue, 11 Feb 2025 14:52:32 +0100 Subject: [PATCH] Set line length to docs related code to 90 Update existing examples to be compliant. --- docs/02_concepts/code/06_logging_formatter.py | 3 ++- docs/pyproject.toml | 9 +++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) create mode 100644 docs/pyproject.toml diff --git a/docs/02_concepts/code/06_logging_formatter.py b/docs/02_concepts/code/06_logging_formatter.py index 8bd6b44d..efeeb695 100644 --- a/docs/02_concepts/code/06_logging_formatter.py +++ b/docs/02_concepts/code/06_logging_formatter.py @@ -7,7 +7,8 @@ # Create a custom logging formatter formatter = logging.Formatter( - '%(asctime)s - %(name)s - %(levelname)s - %(message)s - %(attempt)s - %(status_code)s - %(url)s' + '%(asctime)s - %(name)s - %(levelname)s - %(message)s - ' + '%(attempt)s - %(status_code)s - %(url)s' ) handler = logging.StreamHandler() handler.setFormatter(formatter) diff --git a/docs/pyproject.toml b/docs/pyproject.toml new file mode 100644 index 00000000..73a75678 --- /dev/null +++ b/docs/pyproject.toml @@ -0,0 +1,9 @@ +# Line lenght different from the rest of the code to make sure that the example codes visualised on the generated +# documentation webpages are shown without vertical slider to make them more readable. + +[tool.ruff] +# Inherit all from project top configuration file. +extend = "../pyproject.toml" + +# Override just line length +line-length = 90 # Maximum possible fit to the doc webpage. Longer lines need slider.