Skip to content
This repository was archived by the owner on Apr 26, 2025. It is now read-only.

Commit bcec07d

Browse files
committed
Upgrade linters
1 parent 49369bb commit bcec07d

File tree

3 files changed

+7
-11
lines changed

3 files changed

+7
-11
lines changed

fief_client/client.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -352,9 +352,10 @@ def _decode_id_token(
352352
):
353353
raise FiefIdTokenInvalid()
354354

355-
return claims
356355
except (jwt.JWException, TypeError) as e:
357356
raise FiefIdTokenInvalid() from e
357+
else:
358+
return claims
358359

359360
def _get_openid_configuration_request(self, client: HTTPXClient) -> httpx.Request:
360361
return client.build_request("GET", "/.well-known/openid-configuration")

fief_client/integrations/cli.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -252,8 +252,8 @@ def authorize(
252252

253253
try:
254254
code = code_queue.get(block=False)
255-
except queue.Empty:
256-
raise FiefAuthAuthorizationCodeMissingError()
255+
except queue.Empty as e:
256+
raise FiefAuthAuthorizationCodeMissingError() from e
257257

258258
spinner.text = "Getting a token..."
259259

pyproject.toml

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
[tool.isort]
2-
profile = "black"
3-
41
[[tool.mypy.overrides]]
52
module = "jwcrypto.*"
63
ignore_missing_imports = true
@@ -11,7 +8,7 @@ ignore_missing_imports = true
118

129
[tool.ruff]
1310
target-version = "py38"
14-
extend-select = ["I", "UP"]
11+
extend-select = ["I", "UP", "TRY"]
1512
ignore = ["E501"]
1613
per-file-ignores = {"tests/test_init.py" = ["F401"]}
1714

@@ -38,7 +35,6 @@ features = [
3835
"cli",
3936
]
4037
dependencies = [
41-
"black",
4238
"coverage[toml]",
4339
"greenlet",
4440
"mypy",
@@ -48,7 +44,6 @@ dependencies = [
4844
"pytest-mock",
4945
"respx",
5046
"ruff",
51-
"tryceratops",
5247
"uvicorn[standard]",
5348
]
5449

@@ -61,12 +56,12 @@ dependencies = [
6156
test = "pytest --cov fief_client/ --cov-report=term-missing"
6257
test-cov-xml = "pytest --cov fief_client/ --cov-report=xml"
6358
lint = [
64-
"black . ",
59+
"ruff format . ",
6560
"ruff --fix .",
6661
"mypy fief_client/",
6762
]
6863
lint-check = [
69-
"black --check .",
64+
"ruff format --check .",
7065
"ruff .",
7166
"mypy fief_client/",
7267
]

0 commit comments

Comments
 (0)