From 472a9937e303de68937e9d17ee0e3b7bae3aac8e Mon Sep 17 00:00:00 2001 From: Miha Dolinar Date: Fri, 30 Apr 2021 11:24:25 +0200 Subject: [PATCH] Update on black version and remove spaces Update on the usage of the Black version, which resolves the problem of removing leading and trailing spaces in one-line docstrings. https://github.com/psf/black/pull/1740 --- docs/examples/resource_clients.py | 2 +- setup.cfg | 2 +- src/sensu_go/errors.py | 8 ++++---- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/docs/examples/resource_clients.py b/docs/examples/resource_clients.py index 1ad2c0f..825aba5 100644 --- a/docs/examples/resource_clients.py +++ b/docs/examples/resource_clients.py @@ -792,7 +792,7 @@ def demo_users(client): user = client.users.create( metadata={}, - spec={"username": "demo_user", "password":"demouserpassword"}, + spec={"username": "demo_user", "password": "demouserpassword"}, ) print_cluster_resource(user) diff --git a/setup.cfg b/setup.cfg index 360de3e..d62c043 100644 --- a/setup.cfg +++ b/setup.cfg @@ -45,7 +45,7 @@ install_requires = [options.extras_require] dev = - black + black >= 21.4b2 flake8 mypy pytest >= 6, < 7 diff --git a/src/sensu_go/errors.py b/src/sensu_go/errors.py index 841a072..d61fc78 100644 --- a/src/sensu_go/errors.py +++ b/src/sensu_go/errors.py @@ -2,15 +2,15 @@ class SensuError(Exception): - """ Base exception for the sensu-go package. """ + """Base exception for the sensu-go package.""" class HTTPError(SensuError): - """ Error that indicates a problem with backend connection. """ + """Error that indicates a problem with backend connection.""" class ResponseError(SensuError): - """ Error that indicates a problem with backend's response. """ + """Error that indicates a problem with backend's response.""" def __init__(self, msg: str, url: str, status: int, text: str) -> None: self.url = url @@ -23,4 +23,4 @@ def __init__(self, msg: str, url: str, status: int, text: str) -> None: class AuthError(ResponseError): - """ Error that indicates a problem with credentials. """ + """Error that indicates a problem with credentials."""