Skip to content

Commit 5f10fd0

Browse files
Miha Dolinartadeboro
Miha Dolinar
authored andcommitted
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. psf/black#1740
1 parent 37436d6 commit 5f10fd0

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

docs/examples/resource_clients.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -792,7 +792,7 @@ def demo_users(client):
792792

793793
user = client.users.create(
794794
metadata={},
795-
spec={"username": "demo_user", "password":"demouserpassword"},
795+
spec={"username": "demo_user", "password": "demouserpassword"},
796796
)
797797
print_cluster_resource(user)
798798

setup.cfg

+1-1
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ install_requires =
4545

4646
[options.extras_require]
4747
dev =
48-
black
48+
black >= 21.4b2
4949
flake8
5050
mypy
5151
pytest >= 6, < 7

src/sensu_go/errors.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,15 @@
22

33

44
class SensuError(Exception):
5-
""" Base exception for the sensu-go package. """
5+
"""Base exception for the sensu-go package."""
66

77

88
class HTTPError(SensuError):
9-
""" Error that indicates a problem with backend connection. """
9+
"""Error that indicates a problem with backend connection."""
1010

1111

1212
class ResponseError(SensuError):
13-
""" Error that indicates a problem with backend's response. """
13+
"""Error that indicates a problem with backend's response."""
1414

1515
def __init__(self, msg: str, url: str, status: int, text: str) -> None:
1616
self.url = url
@@ -23,4 +23,4 @@ def __init__(self, msg: str, url: str, status: int, text: str) -> None:
2323

2424

2525
class AuthError(ResponseError):
26-
""" Error that indicates a problem with credentials. """
26+
"""Error that indicates a problem with credentials."""

0 commit comments

Comments
 (0)