Skip to content

Commit 7ee92a5

Browse files
CI fixes
1 parent bc6e7a5 commit 7ee92a5

1 file changed

Lines changed: 30 additions & 13 deletions

File tree

__init__.py

Lines changed: 30 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -6,19 +6,36 @@
66

77
"""Shopops Environment."""
88

9-
from .client import ShopopsEnv
10-
from .models import (
11-
ActionType,
12-
CaseType,
13-
CustomerTier,
14-
DeliveryStatus,
15-
EscalationReason,
16-
FraudSignal,
17-
IssueSeverity,
18-
ItemCategory,
19-
ShopopsAction,
20-
ShopopsObservation,
21-
)
9+
# Allow importing this module both as a package (relative imports)
10+
# and as a top-level module (pytest sometimes imports repo-root __init__.py).
11+
if __package__:
12+
from .client import ShopopsEnv
13+
from .models import (
14+
ActionType,
15+
CaseType,
16+
CustomerTier,
17+
DeliveryStatus,
18+
EscalationReason,
19+
FraudSignal,
20+
IssueSeverity,
21+
ItemCategory,
22+
ShopopsAction,
23+
ShopopsObservation,
24+
)
25+
else:
26+
from client import ShopopsEnv
27+
from models import (
28+
ActionType,
29+
CaseType,
30+
CustomerTier,
31+
DeliveryStatus,
32+
EscalationReason,
33+
FraudSignal,
34+
IssueSeverity,
35+
ItemCategory,
36+
ShopopsAction,
37+
ShopopsObservation,
38+
)
2239

2340
__all__ = [
2441
"ShopopsAction",

0 commit comments

Comments
 (0)