Skip to content

Commit 6524400

Browse files
committed
fix mypy
1 parent 929ea50 commit 6524400

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

_unittests/ut_helpers/test_torch_test_helper.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,7 @@ def forward(self, x, y):
204204
else:
205205
print("output", k, v)
206206
print(string_type(restored, with_shape=True))
207-
l1, l2 = 151, 160
207+
l1, l2 = 182, 191
208208
self.assertEqual(
209209
[
210210
(f"-Model-{l2}", 0, "I"),

onnx_diagnostic/helpers/torch_test_helper.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -192,6 +192,7 @@ def forward(self, x, y):
192192
f[0].forward = f[1]
193193
if dump_file:
194194
# Let's add the cached tensor
195+
assert storage is not None, "storage cannot be None but mypy is confused here."
195196
storage.update(_additional_stolen_objects)
196197
# We clear the cache.
197198
_additional_stolen_objects.clear()

0 commit comments

Comments
 (0)