Skip to content

Commit a4b394f

Browse files
committed
chore: add flake8-bugbear ruff checker
1 parent 53bf727 commit a4b394f

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,7 @@ exclude_lines = [
8484

8585
[tool.ruff.lint]
8686
select = [
87+
"B", # flake8-bugbear
8788
"D", # pydocstyle
8889
"E", # pycodestyle
8990
"F", # pyflakes

scim2_cli/delete.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,11 +34,11 @@ def delete_cli(ctx, resource_type, id, headers, indent):
3434
"""
3535
try:
3636
resource_type = ctx.obj["resource_types"][resource_type]
37-
except KeyError:
37+
except KeyError as exc:
3838
ok_values = ", ".join(ctx.obj["resource_types"])
3939
raise ClickException(
4040
f"Unknown resource type '{resource_type}'. Available values are: {ok_values}'"
41-
)
41+
) from exc
4242

4343
try:
4444
response = ctx.obj["client"].delete(

scim2_cli/query.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,11 +85,11 @@ def query_cli(
8585
if resource_type:
8686
try:
8787
resource_type = ctx.obj["resource_types"][resource_type]
88-
except KeyError:
88+
except KeyError as exc:
8989
ok_values = ", ".join(ctx.obj["resource_types"])
9090
raise ClickException(
9191
f"Unknown resource type '{resource_type}. Available values are: {ok_values}'"
92-
)
92+
) from exc
9393

9494
if ctx.obj.get("stdin"):
9595
check_request_payload = False

0 commit comments

Comments
 (0)