Merge branch 'szhublox-range'

This commit is contained in:
hnmr293
2023-04-08 13:29:21 +09:00
+9 -2
View File
@@ -350,7 +350,14 @@ class KSamplerXYZ:
def parse(self, input: str, cont: Union[Callable[[str],Any],None]):
vs = [ x.strip() for x in input.split(',') ]
if cont is not None:
vs = [cont(v) for v in vs ]
new_vs = []
for v in vs:
new_v = cont(v)
if isinstance(new_v, list):
new_vs += new_v
else:
new_vs.append(new_v)
vs = new_vs
return vs
def parse_int(self, input: str):
@@ -366,7 +373,7 @@ class KSamplerXYZ:
if step is None:
step = 1
return list(range(int(start), int(end), int(step)))
return list(range(int(start), int(end) + 1, int(step)))
def parse_float(self, input: str):
m = re_float.fullmatch(input)