From d5516885d0aae629fcad96bb05a2287a4a56289a Mon Sep 17 00:00:00 2001
From: Karel van Klink <karel.vanklink@geant.org>
Date: Thu, 6 Jul 2023 10:19:57 +0200
Subject: [PATCH] reflect new line-length in docstrings, add proselint as docs
 linter

---
 docs/vale/.vale.ini    |  2 +-
 lso/app.py             |  2 +-
 lso/environment.py     |  3 +--
 lso/routes/default.py  |  3 +--
 lso/routes/device.py   |  9 ++++-----
 lso/routes/ip_trunk.py | 18 +++++++-----------
 6 files changed, 15 insertions(+), 22 deletions(-)

diff --git a/docs/vale/.vale.ini b/docs/vale/.vale.ini
index 7f966cd..0fbe065 100644
--- a/docs/vale/.vale.ini
+++ b/docs/vale/.vale.ini
@@ -7,7 +7,7 @@ Vocab = geant-jargon, Sphinx
 Packages = proselint, Microsoft
 
 [*]
-BasedOnStyles = Vale, Microsoft
+BasedOnStyles = Vale, proselint, Microsoft
 
 [formats]
 py = rst
diff --git a/lso/app.py b/lso/app.py
index 293e5a6..1c28f76 100644
--- a/lso/app.py
+++ b/lso/app.py
@@ -1,4 +1,4 @@
-"""default app creation."""
+"""Default app creation."""
 import lso
 
 app = lso.create_app()
diff --git a/lso/environment.py b/lso/environment.py
index 62b58e5..bd547e7 100644
--- a/lso/environment.py
+++ b/lso/environment.py
@@ -24,8 +24,7 @@ LOGGING_DEFAULT_CONFIG = {
 def setup_logging() -> None:
     """Set up logging using the configured filename.
 
-    if LOGGING_CONFIG is defined in the environment, use this for
-    the filename, otherwise use LOGGING_DEFAULT_CONFIG
+    If LOGGING_CONFIG is defined in the environment, use this for the filename, otherwise use LOGGING_DEFAULT_CONFIG.
     """
     logging_config = LOGGING_DEFAULT_CONFIG
     if "LOGGING_CONFIG" in os.environ:
diff --git a/lso/routes/default.py b/lso/routes/default.py
index 5cace09..fa3af42 100644
--- a/lso/routes/default.py
+++ b/lso/routes/default.py
@@ -1,7 +1,6 @@
 """Default route located at the root URL /.
 
-For now only includes a single endpoint that responds with the current version
-of the API and LSO.
+For now only includes a single endpoint that responds with the current version of the API and LSO.
 """
 import pkg_resources
 from fastapi import APIRouter
diff --git a/lso/routes/device.py b/lso/routes/device.py
index 121ffb3..2e2b865 100644
--- a/lso/routes/device.py
+++ b/lso/routes/device.py
@@ -22,14 +22,13 @@ class NodeProvisioningParams(BaseModel):
     :type dry_run: bool, optional
     """
 
-    #: Callback URL that is reported back to WFO, this will allow for the
-    #: workflow to continue once the playbook has been executed.
+    #: Callback URL that is reported back to WFO, this will allow for the workflow to continue once the playbook has
+    #: been executed.
     callback: HttpUrl
     #: Parameters for the new device.
     subscription: dict
-    #: Whether this playbook execution should be a dry run, or run for real.
-    #: defaults to ``True`` for obvious reasons, also making it an optional
-    #: parameter.
+    #: Whether this playbook execution should be a dry run, or run for real. Defaults to ``True`` for obvious reasons,
+    #: also making it an optional parameter.
     dry_run: Optional[bool] = True
 
 
diff --git a/lso/routes/ip_trunk.py b/lso/routes/ip_trunk.py
index 7ee6cf6..6d415c7 100644
--- a/lso/routes/ip_trunk.py
+++ b/lso/routes/ip_trunk.py
@@ -17,17 +17,15 @@ class IPTrunkParams(BaseModel):
 
     #: The address where LSO should call back to upon completion.
     callback: HttpUrl
-    #: A dictionary representation of the IP trunk
-    #: subscription that is to be provisioned.
+    #: A dictionary representation of the IP trunk subscription that is to be provisioned.
     subscription: dict
 
 
 class IPTrunkProvisioningParams(IPTrunkParams):
     """Additional parameters for provisioning an IPtrunk."""
 
-    #: Whether this playbook execution should be a dry run, or run for real.
-    #: defaults to ``True`` for obvious reasons, also making it an optional
-    #: parameter.
+    #: Whether this playbook execution should be a dry run, or run for real. Defaults to ``True`` for obvious reasons,
+    #: also making it an optional parameter.
     dry_run: Optional[bool] = True
     #: The type of object that is changed.
     object: str
@@ -36,9 +34,8 @@ class IPTrunkProvisioningParams(IPTrunkParams):
 class IPTrunkModifyParams(IPTrunkParams):
     """Additional parameters for modifying an IPtrunk."""
 
-    #: Whether this playbook execution should be a dry run, or run for real.
-    #: defaults to ``True`` for obvious reasons, also making it an optional
-    #: parameter.
+    #: Whether this playbook execution should be a dry run, or run for real. Defaults to ``True`` for obvious reasons,
+    #: also making it an optional parameter.
     dry_run: Optional[bool] = True
     #: The old subscription object, represented as a dictionary. This allows
     #: for calculating the difference in subscriptions.
@@ -55,9 +52,8 @@ class IPTrunkCheckParams(IPTrunkParams):
 class IPTrunkDeleteParams(IPTrunkParams):
     """Additional parameters for deleting an IPtrunk."""
 
-    #: Whether this playbook execution should be a dry run, or run for real.
-    #: defaults to ``True`` for obvious reasons, also making it an optional
-    #: parameter.
+    #: Whether this playbook execution should be a dry run, or run for real. Defaults to ``True`` for obvious reasons,
+    #: also making it an optional parameter.
     dry_run: Optional[bool] = True
 
 
-- 
GitLab