Skip to content

Commit 9d22146

Browse files
committed
[ENH] mpython templates
1 parent 9aa9960 commit 9d22146

3 files changed

Lines changed: 16 additions & 2 deletions

File tree

.mpython/templates/class_header.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
1-
from mpython import Runtime, MatlabClass
1+
from mpython import MatlabClass
2+
from spm._runtime import Runtime, RuntimeMixin
23

34

4-
class <classname>(MatlabClass):
5+
class <classname>(RuntimeMixin, MatlabClass):
56
def __init__(self, *args, **kwargs):
67
<docstring>
78
super().__init__()
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
from spm._runtime import Runtime

.mpython/templates/init.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
from mpython import (
2+
MatlabClass,
3+
MatlabFunction,
4+
Cell,
5+
Struct,
6+
Array,
7+
SparseArray,
8+
)
9+
from ._runtime import Runtime
10+
from ._version import __version__
11+
12+
<imports>

0 commit comments

Comments
 (0)