Skip to content

Commit

Permalink
app: update doctest_skip (#15997)
Browse files Browse the repository at this point in the history
simple

Co-authored-by: hhsecond <sherin@grid.ai>
  • Loading branch information
Borda and hhsecond committed Dec 12, 2022
1 parent 5e705fa commit 4fea6bf
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions src/lightning_app/components/serve/python_server.py
Expand Up @@ -7,7 +7,7 @@

import uvicorn
from fastapi import FastAPI
from lightning_utilities.core.imports import compare_version
from lightning_utilities.core.imports import compare_version, module_available
from pydantic import BaseModel

from lightning_app.core.work import LightningWork
Expand All @@ -16,12 +16,9 @@

logger = Logger(__name__)

__doctest_skip__ = ["PythonServer", "PythonServer.*"]


# Skip doctests if requirements aren't available
if not _is_torch_available():
__doctest_skip__ += ["PythonServer", "PythonServer.*"]
if not module_available("lightning_api_access") or not _is_torch_available():
__doctest_skip__ = ["PythonServer", "PythonServer.*"]


def _get_device():
Expand Down

0 comments on commit 4fea6bf

Please sign in to comment.