Skip to content

Commit 4354cfb

Browse files
nvdaesseanbuddCopilot
authored
Apply suggestions from code review
Co-authored-by: Sean Budd <[email protected]> Co-authored-by: Copilot <[email protected]>
1 parent d65f79f commit 4354cfb

File tree

2 files changed

+2
-7
lines changed

2 files changed

+2
-7
lines changed

_validate/regenerateTranslations.py

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,6 @@ def regenerateJsonFile(filePath: str, errorFilePath: str | None) -> None:
2424
with open(errorFilePath, "w") as errorFile:
2525
errorFile.write(f"Validation Errors:\n{manifest.errors}")
2626
return
27-
changelog = manifest.get("changelog") # type: ignore[reportUnknownMemberType]
28-
if changelog == "None":
29-
# The config default is None
30-
# which is parsed by configobj as a string not a NoneType
31-
changelog = None
3227
for langCode, manifest in getAddonManifestLocalizations(manifest):
3328
translatedChangelog: str | None = manifest.get("changelog") # type: ignore[reportUnknownMemberType]
3429
if translatedChangelog == "None":

_validate/validate.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -142,8 +142,8 @@ def checkChangelogMatches(manifest: AddonManifest, submission: JsonObjT) -> Vali
142142
changelog = None
143143
if changelog != submission.get("changelog"):
144144
yield (
145-
f"Submission 'changelog' must be set to '{changelog}' "
146-
f"in json file instead of {submission.get('changelog')}"
145+
f"Submission 'changelog' must be set to '{changelog}' in json file."
146+
f" Instead got: '{submission.get('changelog')}'"
147147
)
148148

149149

0 commit comments

Comments
 (0)