mirror of
https://github.com/bsedin/matrix-webhook.git
synced 2026-04-09 11:25:40 +00:00
fix pydocstyle
This commit is contained in:
@@ -38,8 +38,5 @@ matrix-webhook = "matrix_webhook.__main__:main"
|
|||||||
[tool.poetry.urls]
|
[tool.poetry.urls]
|
||||||
"changelog" = "https://github.com/nim65s/matrix-webhook/blob/master/CHANGELOG.md"
|
"changelog" = "https://github.com/nim65s/matrix-webhook/blob/master/CHANGELOG.md"
|
||||||
|
|
||||||
[tool.pydocstyle]
|
|
||||||
add-ignore = ["D200", "D203", "D204", "D212"]
|
|
||||||
|
|
||||||
[tool.tomlsort]
|
[tool.tomlsort]
|
||||||
all = true
|
all = true
|
||||||
|
|||||||
@@ -51,9 +51,7 @@ def wait_available(url: str, key: str, timeout: int = 10) -> bool:
|
|||||||
"""Wait until a service answer correctly or timeout."""
|
"""Wait until a service answer correctly or timeout."""
|
||||||
|
|
||||||
def check_json(url: str, key: str) -> bool:
|
def check_json(url: str, key: str) -> bool:
|
||||||
"""
|
"""Ensure a service answers with valid json including a certain key."""
|
||||||
Ensure a service at a given url answers with valid json including a certain key.
|
|
||||||
"""
|
|
||||||
try:
|
try:
|
||||||
data = httpx.get(url).json()
|
data = httpx.get(url).json()
|
||||||
return key in data
|
return key in data
|
||||||
|
|||||||
Reference in New Issue
Block a user