Skip to content

Commit 52ed0d0

Browse files
authored
chore: fix for pylint 4 (#656)
Signed-off-by: Henry Schreiner <[email protected]>
1 parent c68e597 commit 52ed0d0

File tree

4 files changed

+9
-11
lines changed

4 files changed

+9
-11
lines changed

src/sp_repo_review/checks/mypy.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ def check(pyproject: dict[str, Any]) -> bool:
122122
"""
123123

124124
match pyproject:
125-
case {"tool": {"mypy": {"enable_error_code": list(codes)}}}:
125+
case {"tool": {"mypy": {"enable_error_code": codes}}}:
126126
return "ignore-without-code" in codes
127127
case _:
128128
return False
@@ -147,7 +147,7 @@ def check(pyproject: dict[str, Any]) -> bool:
147147
"""
148148

149149
match pyproject:
150-
case {"tool": {"mypy": {"enable_error_code": list(codes)}}}:
150+
case {"tool": {"mypy": {"enable_error_code": codes}}}:
151151
return "redundant-expr" in codes
152152
case _:
153153
return False
@@ -172,7 +172,7 @@ def check(pyproject: dict[str, Any]) -> bool:
172172
"""
173173

174174
match pyproject:
175-
case {"tool": {"mypy": {"enable_error_code": list(codes)}}}:
175+
case {"tool": {"mypy": {"enable_error_code": codes}}}:
176176
return "truthy-bool" in codes
177177
case _:
178178
return False

src/sp_repo_review/checks/pyproject.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ def check(pyproject: dict[str, Any]) -> bool:
4747
"""
4848

4949
match pyproject:
50-
case {"build-system": {"requires": list(req)}}:
50+
case {"build-system": {"requires": req}}:
5151
return all(not r.startswith("wheel") for r in req)
5252
case _:
5353
return False
@@ -73,9 +73,7 @@ def check(pyproject: dict[str, Any], setupcfg: ConfigParser | None) -> bool | No
7373
case {
7474
"tool": {
7575
"poetry": {
76-
"dependencies": {
77-
"python": str(requires) | {"version": str(requires)}
78-
}
76+
"dependencies": {"python": requires} | {"version": requires}
7977
}
8078
}
8179
}:

src/sp_repo_review/checks/readthedocs.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ def check(readthedocs: dict[str, Any]) -> bool:
4141
"""
4242

4343
match readthedocs:
44-
case {"version": int(x)} if x >= 2:
44+
case {"version": x} if x >= 2:
4545
return True
4646
return False
4747

src/sp_repo_review/checks/ruff.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -124,9 +124,9 @@ def check(cls: type[RF1xxMixin], ruff: dict[str, Any]) -> bool:
124124

125125
match ruff:
126126
case (
127-
{"lint": {"select": list(x)} | {"extend-select": list(x)}}
128-
| {"select": list(x)}
129-
| {"extend-select": list(x)}
127+
{"lint": {"select": x} | {"extend-select": x}}
128+
| {"select": x}
129+
| {"extend-select": x}
130130
):
131131
return cls.code in x or "ALL" in x
132132
case _:

0 commit comments

Comments
 (0)