Claude commited on
Commit
03ead59
·
unverified ·
1 Parent(s): b2d51c7

fix(api): add mypy ignore for optional torch import

Browse files

torch is an optional dependency that may not be installed in all
environments. Add type: ignore comment to satisfy mypy when torch
stubs are not available.

src/stroke_deepisles_demo/api/main.py CHANGED
@@ -50,7 +50,7 @@ async def lifespan(_app: FastAPI) -> AsyncIterator[None]:
50
 
51
  # Check for GPU availability (DeepISLES requires GPU)
52
  try:
53
- import torch
54
 
55
  if not torch.cuda.is_available():
56
  logger.warning(
 
50
 
51
  # Check for GPU availability (DeepISLES requires GPU)
52
  try:
53
+ import torch # type: ignore[import-not-found]
54
 
55
  if not torch.cuda.is_available():
56
  logger.warning(