This commit is contained in:
parent
7a561603ed
commit
878c0dc216
|
@ -21,6 +21,7 @@ itsdangerous = "^2.1.2"
|
||||||
[tool.poetry.dev-dependencies]
|
[tool.poetry.dev-dependencies]
|
||||||
pytest = "^7.4.2"
|
pytest = "^7.4.2"
|
||||||
black = { version = "^23.9.1", python = ">=3.12" }
|
black = { version = "^23.9.1", python = ">=3.12" }
|
||||||
|
ruff = { version = "^0.1.0", python = ">=3.12" }
|
||||||
|
|
||||||
[tool.black]
|
[tool.black]
|
||||||
line-length = 120
|
line-length = 120
|
||||||
|
@ -53,3 +54,13 @@ force_grid_wrap = 0
|
||||||
use_parentheses = true
|
use_parentheses = true
|
||||||
ensure_newline_before_comments = true
|
ensure_newline_before_comments = true
|
||||||
line_length = 120
|
line_length = 120
|
||||||
|
|
||||||
|
|
||||||
|
[tool.ruff]
|
||||||
|
# Enable Pyflakes (`F`) and a subset of the pycodestyle (`E`) codes by default.
|
||||||
|
# Unlike Flake8, Ruff doesn't enable pycodestyle warnings (`W`) or
|
||||||
|
# McCabe complexity (`C901`) by default.
|
||||||
|
select = ["E4", "E7", "E9", "F"]
|
||||||
|
ignore = []
|
||||||
|
line-length = 120
|
||||||
|
target-version = "py312"
|
|
@ -4,7 +4,7 @@ from httpx import AsyncClient, HTTPError
|
||||||
|
|
||||||
from settings import AUTH_URL
|
from settings import AUTH_URL
|
||||||
|
|
||||||
INTERNAL_AUTH_SERVER = "v2.discours" in AUTH_URL or "testapi.discours" in AUTH_URL
|
INTERNAL_AUTH_SERVER = "auth.discours.io" not in AUTH_URL
|
||||||
|
|
||||||
|
|
||||||
async def check_auth(req):
|
async def check_auth(req):
|
||||||
|
@ -23,7 +23,7 @@ async def check_auth(req):
|
||||||
"variables": None,
|
"variables": None,
|
||||||
}
|
}
|
||||||
|
|
||||||
async with AsyncClient() as client:
|
async with AsyncClient(timeout=30.0) as client:
|
||||||
response = await client.post(AUTH_URL, headers=headers, json=gql)
|
response = await client.post(AUTH_URL, headers=headers, json=gql)
|
||||||
print(f"[services.auth] response: {response.status_code} {response.text}")
|
print(f"[services.auth] response: {response.status_code} {response.text}")
|
||||||
if response.status_code != 200:
|
if response.status_code != 200:
|
||||||
|
|
Loading…
Reference in New Issue
Block a user