Skip to content

Commit 2e77412

Browse files
committed
fix up typing for pyright
1 parent 3f25cd5 commit 2e77412

10 files changed

+211
-341
lines changed

_tests/test_createJson.py

Lines changed: 21 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,12 @@
1-
#!/usr/bin/env python
2-
3-
# Copyright (C) 2022-2024 Noelia Ruiz Martínez, NV Access Limited
1+
# Copyright (C) 2022-2025 Noelia Ruiz Martínez, NV Access Limited
42
# This file may be used under the terms of the GNU General Public License, version 2 or later.
53
# For more details see: https://www.gnu.org/licenses/gpl-2.0.html
64

75
import unittest
86
import os
97
import shutil
108
import json
11-
from _validate import (
12-
createJson,
13-
addonManifest,
14-
manifestLoader,
15-
)
9+
from _validate import createJson, addonManifest, manifestLoader
1610

1711
TOP_DIR = os.path.abspath(os.path.dirname(__file__))
1812
SOURCE_DIR = os.path.dirname(TOP_DIR)
@@ -93,14 +87,25 @@ def setUp(self) -> None:
9387

9488
def test_validVersion(self):
9589
outputFilePath = createJson.buildOutputFilePath(
96-
data={
97-
"addonId": "testId",
98-
"addonVersionNumber": {
99-
"major": 1,
100-
"minor": 2,
101-
"patch": 0,
102-
},
103-
},
90+
data=createJson.AddonData(
91+
addonId="addonId",
92+
displayName="Addon name",
93+
URL="https://example.com",
94+
description="Addon description",
95+
sha256="sha256checksum",
96+
addonVersionName="1.2.0",
97+
addonVersionNumber={"major": 1, "minor": 2, "patch": 0},
98+
minNVDAVersion={"major": 2023, "minor": 1, "patch": 0},
99+
lastTestedVersion={"major": 2023, "minor": 2, "patch": 0},
100+
channel="stable",
101+
publisher="Name of addon author or organisation",
102+
sourceURL="https://example.com",
103+
license="GPL v2",
104+
homepage="https://example.com",
105+
licenseURL="https://www.gnu.org/licenses/gpl-2.0.html",
106+
submissionTime=createJson.getCurrentTime(),
107+
translations=[],
108+
),
104109
parentDir=self.outputDir,
105110
)
106111

_tests/test_majorMinorPatch.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright (C) 2022-2023 Noelia Ruiz Martínez, NV Access Limited
1+
# Copyright (C) 2022-2025 Noelia Ruiz Martínez, NV Access Limited
22
# This file may be used under the terms of the GNU General Public License, version 2 or later.
33
# For more details see: https://www.gnu.org/licenses/gpl-2.0.html
44

0 commit comments

Comments
 (0)