From 2db0adbf9f25653d3805bf55b4185867a74d45e1 Mon Sep 17 00:00:00 2001 From: Talon Chandler Date: Sat, 21 Dec 2024 15:06:00 -0800 Subject: [PATCH] revert TYPE_CHECKING to strings --- waveorder/models/inplane_oriented_thick_pol3d_vector.py | 7 ++----- waveorder/visuals/napari_visuals.py | 5 +---- 2 files changed, 3 insertions(+), 9 deletions(-) diff --git a/waveorder/models/inplane_oriented_thick_pol3d_vector.py b/waveorder/models/inplane_oriented_thick_pol3d_vector.py index 250ec47..7150a97 100644 --- a/waveorder/models/inplane_oriented_thick_pol3d_vector.py +++ b/waveorder/models/inplane_oriented_thick_pol3d_vector.py @@ -2,14 +2,11 @@ import numpy as np from torch import Tensor -from typing import Literal, TYPE_CHECKING +from typing import Literal from torch.nn.functional import avg_pool3d, interpolate from waveorder import optics, sampling, stokes, util from waveorder.visuals.napari_visuals import add_transfer_function_to_viewer -if TYPE_CHECKING: - import napari - def generate_test_phantom(zyx_shape: tuple[int, int, int]) -> torch.Tensor: # Simulate @@ -298,7 +295,7 @@ def calculate_singular_system(sfZYX_transfer_function): def visualize_transfer_function( - viewer: napari.Viewer, + viewer: "napari.Viewer", sfZYX_transfer_function: torch.Tensor, zyx_scale: tuple[float, float, float], ) -> None: diff --git a/waveorder/visuals/napari_visuals.py b/waveorder/visuals/napari_visuals.py index 36ae829..b188774 100644 --- a/waveorder/visuals/napari_visuals.py +++ b/waveorder/visuals/napari_visuals.py @@ -4,12 +4,9 @@ import numpy as np import torch -if TYPE_CHECKING: - import napari - def add_transfer_function_to_viewer( - viewer: napari.Viewer, + viewer: "napari.Viewer", transfer_function: torch.Tensor, zyx_scale: tuple[float, float, float], layer_name: str = "Transfer Function",