Skip to content

Commit dc08a67

Browse files
committed
Open with explicit encoding and include json5 in test dependencies
1 parent 4a11606 commit dc08a67

2 files changed

Lines changed: 3 additions & 2 deletions

File tree

pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,7 @@ dev = [
107107
test = [
108108
"pytest >=9",
109109
"repo-review >=0.10.6",
110+
"sp-repo-review[json5]"
110111
]
111112
cog = [
112113
"cogapp",

src/sp_repo_review/checks/renovate.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ def renovate(root: Traversable) -> dict[str, Any]:
3838
for renovate_path in renovate_paths:
3939
if not renovate_path.is_file():
4040
continue
41-
with renovate_path.open() as f:
41+
with renovate_path.open(encoding="utf-8") as f:
4242
text = f.read()
4343
try:
4444
# Handles JSON and JSONC (comments / trailing commas) with no
@@ -106,7 +106,7 @@ class REN210(Renovate):
106106
url = mk_url("gha-basic")
107107

108108
@staticmethod
109-
def check(renovate: dict[str, Any]) -> bool | None | str:
109+
def check(renovate: dict[str, Any]) -> bool | str | None:
110110
"""
111111
Ensures that Renovate is configured to maintain GitHub action versions.
112112

0 commit comments

Comments
 (0)