Skip to content

Commit

Permalink
made paquo import global
Browse files Browse the repository at this point in the history
  • Loading branch information
swaradgat19 committed Jan 5, 2024
1 parent 2ff65c9 commit a17443c
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions wsinfer/qupath.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,16 @@
import json
from pathlib import Path

try:
from paquo.projects import QuPathProject

HAS_PAQUO = True
except Exception:
HAS_PAQUO = False


def add_image_and_geojson(
qupath_proj, # type: ignore
qupath_proj: QuPathProject,
*,
image_path: Path | str,
geojson_path: Path | str,
Expand All @@ -25,13 +32,6 @@ def add_image_and_geojson(


def make_qupath_project(wsi_dir: Path, results_dir: Path) -> None:
try:
from paquo.projects import QuPathProject

HAS_PAQUO = True
except Exception:
HAS_PAQUO = False

if not HAS_PAQUO:
print(
"""Cannot find QuPath.
Expand Down

0 comments on commit a17443c

Please sign in to comment.