Skip to content

Commit ef63aea

Browse files
committed
MPT-12874 Fix unplanned recursion on MPTClient with commerce
1 parent 8e98753 commit ef63aea

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

mpt_api_client/mptclient.py

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
from mpt_api_client.resources import OrderCollectionClient
44

55

6-
class MPTClient:
7-
"""MPT API Client."""
6+
class MPTClientBase:
7+
"""MPT API Client Base."""
88

99
def __init__(
1010
self,
@@ -19,6 +19,10 @@ def __init__(
1919
def __getattr__(self, name): # type: ignore[no-untyped-def]
2020
return self.registry.get(name)(client=self.mpt_client)
2121

22+
23+
class MPTClient(MPTClientBase):
24+
"""MPT API Client."""
25+
2226
@property
2327
def commerce(self) -> "CommerceMpt":
2428
"""Commerce MPT API Client.
@@ -30,7 +34,7 @@ def commerce(self) -> "CommerceMpt":
3034
return CommerceMpt(mpt_client=self.mpt_client, registry=commerce)
3135

3236

33-
class CommerceMpt(MPTClient):
37+
class CommerceMpt(MPTClientBase):
3438
"""Commerce MPT API Client."""
3539

3640
@property

0 commit comments

Comments
 (0)