Skip to content

Commit 80f97b5

Browse files
committed
use kw_only=True to prevent to fix class init non-default argument err
1 parent f0d63bb commit 80f97b5

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

datacrunch/containers/containers.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ class VolumeMount:
131131
type: VolumeMountType
132132
mount_path: str
133133
# Deprecated: use MemoryMount for memory volumes instead.
134-
size_in_mb: Optional[int] = None
134+
size_in_mb: Optional[int] = field(default=None, kw_only=True)
135135

136136

137137
@dataclass_json(undefined=Undefined.EXCLUDE)
@@ -165,9 +165,9 @@ class SecretMount(VolumeMount):
165165
file_names: Optional[List[str]] = None
166166

167167
def __init__(self, mount_path: str, secret_name: str, file_names: Optional[List[str]] = None):
168-
super().__init__(type=VolumeMountType.SECRET, mount_path=mount_path)
169168
self.secret_name = secret_name
170169
self.file_names = file_names
170+
super().__init__(type=VolumeMountType.SECRET, mount_path=mount_path)
171171

172172

173173
@dataclass_json(undefined=Undefined.EXCLUDE)

0 commit comments

Comments
 (0)