Skip to content

Commit d5c0555

Browse files
Circular imports strike again
1 parent fc3acd3 commit d5c0555

File tree

1 file changed

+9
-2
lines changed
  • tidy3d/plugins/smatrix/component_modelers

1 file changed

+9
-2
lines changed

tidy3d/plugins/smatrix/component_modelers/base.py

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@
33
from __future__ import annotations
44

55
from abc import ABC, abstractmethod
6+
7+
# DO NOT import from web if it can be avoided, to avoid circular imports
8+
# from tidy3d.web.core.types import PayType
9+
from enum import Enum
610
from typing import Generic, Optional, TypeVar, Union, get_args
711

812
import numpy as np
@@ -27,8 +31,11 @@
2731
from tidy3d.plugins.smatrix.ports.types import TerminalPortType
2832
from tidy3d.plugins.smatrix.ports.wave import WavePort
2933

30-
# DO NOT import from web if it can be avoided, to avoid circular imports
31-
from tidy3d.web.core.types import PayType
34+
35+
class PayType(str, Enum):
36+
CREDITS = "FLEX_CREDIT"
37+
AUTO = "AUTO"
38+
3239

3340
# fwidth of gaussian pulse in units of central frequency
3441
FWIDTH_FRAC = 1.0 / 10

0 commit comments

Comments
 (0)