-
-
Notifications
You must be signed in to change notification settings - Fork 692
Fix mypy issues with mypy==0.920 #2361
Copy link
Copy link
Closed
Labels
Description
🐛 Bug description
Our code base mypy check is failing:
ignite/handlers/time_profilers.py:638: error: Incompatible return value type
(got
"List[List[Union[Any, str, float, Tuple[Union[str, float], Union[str, float]]]]]",
expected "List[List[Union[str, float]]]") [return-value]
return event_handler_stats
^
ignite/handlers/param_scheduler.py:829: error: unused "type: ignore" comment
scheduler = cls(save_history=False, lr_scheduler=lr_schedu...
^
ignite/handlers/checkpoint.py:721: error: unused "type: ignore" comment
tmp_file = tmp.file # type: ignore
^
ignite/contrib/handlers/neptune_logger.py:588: error: unused "type: ignore"
comment
torch.save(checkpoint, tmp.file) # type: ignore[attr-defi...
^
Found 4 errors in 4 files (checked 103 source files)
for mypy==0.920
Let's make our codebase compatible.
Environment
- PyTorch Version (e.g., 1.4):
- Ignite Version (e.g., 0.3.0):
- OS (e.g., Linux):
- How you installed Ignite (
conda,pip, source): - Python version:
- Any other relevant information:
Reactions are currently unavailable