Skip to content

Commit 41e23e6

Browse files
committed
fix: some mypy errors, do release for v0.1.1rc3
1 parent 5d0a3f4 commit 41e23e6

File tree

3 files changed

+8
-5
lines changed

3 files changed

+8
-5
lines changed

CHANGELOG.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,9 @@ and this project adheres to [Semantic Versioning](https://packaging.python.org/e
77

88
Note that the log for version before v0.1.1 may not be in the mentioned format.
99

10-
## Unreleased
10+
## [Unreleased]
11+
12+
## v0.1.1rc3
1113

1214
### Added
1315

grading_lib/VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
0.1.1rc2
1+
0.1.1rc3

grading_lib/common.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -157,13 +157,13 @@ def getDescription(self, test: unittest.TestCase) -> str:
157157
else:
158158
return str(test)
159159

160-
def startTest(self, test):
160+
def startTest(self, test: unittest.TestCase):
161161
super().startTest(test)
162162
test_method = getattr(test, test._testMethodName)
163163
if hasattr(test_method, "__gradinglib_points"):
164164
self.total_points += getattr(test_method, "__gradinglib_points")
165165

166-
def addSuccess(self, test):
166+
def addSuccess(self, test: unittest.TestCase):
167167
super().addSuccess(test)
168168
test_method = getattr(test, test._testMethodName)
169169
if hasattr(test_method, "__gradinglib_points"):
@@ -174,14 +174,15 @@ def addFailure(self, test: unittest.TestCase, err) -> None:
174174
self._mirrorOutput = True
175175

176176
if self.showAll:
177+
# FIXME: This ._write_status does not exist in 3.10.
177178
self._write_status(test, "FAIL")
178179
elif self.dots:
179180
self.stream.write("F")
180181
self.stream.flush()
181182

182183

183184
class MinimalistTestRunner(unittest.TextTestRunner):
184-
def run(self, test):
185+
def run(self, test: unittest.TestSuite | unittest.TestCase) -> unittest.TestResult:
185186
result = super().run(test)
186187
self.stream.writeln(f"POINTS: {result.points} / {result.total_points}")
187188
self.stream.flush()

0 commit comments

Comments
 (0)