Skip to content
Snippets Groups Projects
Verified Commit d5516885 authored by Karel van Klink's avatar Karel van Klink :smiley_cat:
Browse files

reflect new line-length in docstrings, add proselint as docs linter

parent 11744238
No related branches found
No related tags found
1 merge request!35reflect new line-length in docstrings, add proselint as docs linter
Pipeline #83329 passed
...@@ -7,7 +7,7 @@ Vocab = geant-jargon, Sphinx ...@@ -7,7 +7,7 @@ Vocab = geant-jargon, Sphinx
Packages = proselint, Microsoft Packages = proselint, Microsoft
[*] [*]
BasedOnStyles = Vale, Microsoft BasedOnStyles = Vale, proselint, Microsoft
[formats] [formats]
py = rst py = rst
"""default app creation.""" """Default app creation."""
import lso import lso
app = lso.create_app() app = lso.create_app()
......
...@@ -24,8 +24,7 @@ LOGGING_DEFAULT_CONFIG = { ...@@ -24,8 +24,7 @@ LOGGING_DEFAULT_CONFIG = {
def setup_logging() -> None: def setup_logging() -> None:
"""Set up logging using the configured filename. """Set up logging using the configured filename.
if LOGGING_CONFIG is defined in the environment, use this for If LOGGING_CONFIG is defined in the environment, use this for the filename, otherwise use LOGGING_DEFAULT_CONFIG.
the filename, otherwise use LOGGING_DEFAULT_CONFIG
""" """
logging_config = LOGGING_DEFAULT_CONFIG logging_config = LOGGING_DEFAULT_CONFIG
if "LOGGING_CONFIG" in os.environ: if "LOGGING_CONFIG" in os.environ:
......
"""Default route located at the root URL /. """Default route located at the root URL /.
For now only includes a single endpoint that responds with the current version For now only includes a single endpoint that responds with the current version of the API and LSO.
of the API and LSO.
""" """
import pkg_resources import pkg_resources
from fastapi import APIRouter from fastapi import APIRouter
......
...@@ -22,14 +22,13 @@ class NodeProvisioningParams(BaseModel): ...@@ -22,14 +22,13 @@ class NodeProvisioningParams(BaseModel):
:type dry_run: bool, optional :type dry_run: bool, optional
""" """
#: Callback URL that is reported back to WFO, this will allow for the #: Callback URL that is reported back to WFO, this will allow for the workflow to continue once the playbook has
#: workflow to continue once the playbook has been executed. #: been executed.
callback: HttpUrl callback: HttpUrl
#: Parameters for the new device. #: Parameters for the new device.
subscription: dict subscription: dict
#: Whether this playbook execution should be a dry run, or run for real. #: Whether this playbook execution should be a dry run, or run for real. Defaults to ``True`` for obvious reasons,
#: defaults to ``True`` for obvious reasons, also making it an optional #: also making it an optional parameter.
#: parameter.
dry_run: Optional[bool] = True dry_run: Optional[bool] = True
......
...@@ -17,17 +17,15 @@ class IPTrunkParams(BaseModel): ...@@ -17,17 +17,15 @@ class IPTrunkParams(BaseModel):
#: The address where LSO should call back to upon completion. #: The address where LSO should call back to upon completion.
callback: HttpUrl callback: HttpUrl
#: A dictionary representation of the IP trunk #: A dictionary representation of the IP trunk subscription that is to be provisioned.
#: subscription that is to be provisioned.
subscription: dict subscription: dict
class IPTrunkProvisioningParams(IPTrunkParams): class IPTrunkProvisioningParams(IPTrunkParams):
"""Additional parameters for provisioning an IPtrunk.""" """Additional parameters for provisioning an IPtrunk."""
#: Whether this playbook execution should be a dry run, or run for real. #: Whether this playbook execution should be a dry run, or run for real. Defaults to ``True`` for obvious reasons,
#: defaults to ``True`` for obvious reasons, also making it an optional #: also making it an optional parameter.
#: parameter.
dry_run: Optional[bool] = True dry_run: Optional[bool] = True
#: The type of object that is changed. #: The type of object that is changed.
object: str object: str
...@@ -36,9 +34,8 @@ class IPTrunkProvisioningParams(IPTrunkParams): ...@@ -36,9 +34,8 @@ class IPTrunkProvisioningParams(IPTrunkParams):
class IPTrunkModifyParams(IPTrunkParams): class IPTrunkModifyParams(IPTrunkParams):
"""Additional parameters for modifying an IPtrunk.""" """Additional parameters for modifying an IPtrunk."""
#: Whether this playbook execution should be a dry run, or run for real. #: Whether this playbook execution should be a dry run, or run for real. Defaults to ``True`` for obvious reasons,
#: defaults to ``True`` for obvious reasons, also making it an optional #: also making it an optional parameter.
#: parameter.
dry_run: Optional[bool] = True dry_run: Optional[bool] = True
#: The old subscription object, represented as a dictionary. This allows #: The old subscription object, represented as a dictionary. This allows
#: for calculating the difference in subscriptions. #: for calculating the difference in subscriptions.
...@@ -55,9 +52,8 @@ class IPTrunkCheckParams(IPTrunkParams): ...@@ -55,9 +52,8 @@ class IPTrunkCheckParams(IPTrunkParams):
class IPTrunkDeleteParams(IPTrunkParams): class IPTrunkDeleteParams(IPTrunkParams):
"""Additional parameters for deleting an IPtrunk.""" """Additional parameters for deleting an IPtrunk."""
#: Whether this playbook execution should be a dry run, or run for real. #: Whether this playbook execution should be a dry run, or run for real. Defaults to ``True`` for obvious reasons,
#: defaults to ``True`` for obvious reasons, also making it an optional #: also making it an optional parameter.
#: parameter.
dry_run: Optional[bool] = True dry_run: Optional[bool] = True
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment