Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/sp_repo_review/checks/mypy.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ def check(pyproject: dict[str, Any]) -> bool:
"""

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

match pyproject:
case {"tool": {"mypy": {"enable_error_code": list(codes)}}}:
case {"tool": {"mypy": {"enable_error_code": codes}}}:
return "redundant-expr" in codes
case _:
return False
Expand All @@ -172,7 +172,7 @@ def check(pyproject: dict[str, Any]) -> bool:
"""

match pyproject:
case {"tool": {"mypy": {"enable_error_code": list(codes)}}}:
case {"tool": {"mypy": {"enable_error_code": codes}}}:
return "truthy-bool" in codes
case _:
return False
Expand Down
6 changes: 2 additions & 4 deletions src/sp_repo_review/checks/pyproject.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ def check(pyproject: dict[str, Any]) -> bool:
"""

match pyproject:
case {"build-system": {"requires": list(req)}}:
case {"build-system": {"requires": req}}:
return all(not r.startswith("wheel") for r in req)
case _:
return False
Expand All @@ -73,9 +73,7 @@ def check(pyproject: dict[str, Any], setupcfg: ConfigParser | None) -> bool | No
case {
"tool": {
"poetry": {
"dependencies": {
"python": str(requires) | {"version": str(requires)}
}
"dependencies": {"python": requires} | {"version": requires}
}
}
}:
Expand Down
2 changes: 1 addition & 1 deletion src/sp_repo_review/checks/readthedocs.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ def check(readthedocs: dict[str, Any]) -> bool:
"""

match readthedocs:
case {"version": int(x)} if x >= 2:
case {"version": x} if x >= 2:
return True
return False

Expand Down
6 changes: 3 additions & 3 deletions src/sp_repo_review/checks/ruff.py
Original file line number Diff line number Diff line change
Expand Up @@ -124,9 +124,9 @@ def check(cls: type[RF1xxMixin], ruff: dict[str, Any]) -> bool:

match ruff:
case (
{"lint": {"select": list(x)} | {"extend-select": list(x)}}
| {"select": list(x)}
| {"extend-select": list(x)}
{"lint": {"select": x} | {"extend-select": x}}
| {"select": x}
| {"extend-select": x}
):
return cls.code in x or "ALL" in x
case _:
Expand Down