Skip to content

Commit 50de54d

Browse files
chore(ui): lint
1 parent 04b893f commit 50de54d

File tree

2 files changed

+15
-21
lines changed

2 files changed

+15
-21
lines changed

invokeai/frontend/web/src/features/nodes/types/field.ts

Lines changed: 14 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1023,7 +1023,7 @@ const zFloatGeneratorArithmeticSequence = z.object({
10231023
});
10241024
export type FloatGeneratorArithmeticSequence = z.infer<typeof zFloatGeneratorArithmeticSequence>;
10251025
export const getFloatGeneratorArithmeticSequenceDefaults = () => zFloatGeneratorArithmeticSequence.parse({});
1026-
export const getFloatGeneratorArithmeticSequenceValues = (generator: FloatGeneratorArithmeticSequence) => {
1026+
const getFloatGeneratorArithmeticSequenceValues = (generator: FloatGeneratorArithmeticSequence) => {
10271027
const { start, step, count } = generator;
10281028
if (step === 0) {
10291029
return [start];
@@ -1041,8 +1041,8 @@ const zFloatGeneratorLinearDistribution = z.object({
10411041
values: z.array(z.number()).nullish(),
10421042
});
10431043
export type FloatGeneratorLinearDistribution = z.infer<typeof zFloatGeneratorLinearDistribution>;
1044-
export const getFloatGeneratorLinearDistributionDefaults = () => zFloatGeneratorLinearDistribution.parse({});
1045-
export const getFloatGeneratorLinearDistributionValues = (generator: FloatGeneratorLinearDistribution) => {
1044+
const getFloatGeneratorLinearDistributionDefaults = () => zFloatGeneratorLinearDistribution.parse({});
1045+
const getFloatGeneratorLinearDistributionValues = (generator: FloatGeneratorLinearDistribution) => {
10461046
const { start, end, count } = generator;
10471047
if (count === 1) {
10481048
return [start];
@@ -1060,11 +1060,8 @@ const zFloatGeneratorUniformRandomDistribution = z.object({
10601060
values: z.array(z.number()).nullish(),
10611061
});
10621062
export type FloatGeneratorUniformRandomDistribution = z.infer<typeof zFloatGeneratorUniformRandomDistribution>;
1063-
export const getFloatGeneratorUniformRandomDistributionDefaults = () =>
1064-
zFloatGeneratorUniformRandomDistribution.parse({});
1065-
export const getFloatGeneratorUniformRandomDistributionValues = (
1066-
generator: FloatGeneratorUniformRandomDistribution
1067-
) => {
1063+
const getFloatGeneratorUniformRandomDistributionDefaults = () => zFloatGeneratorUniformRandomDistribution.parse({});
1064+
const getFloatGeneratorUniformRandomDistributionValues = (generator: FloatGeneratorUniformRandomDistribution) => {
10681065
const { min, max, count } = generator;
10691066
const values = Array.from({ length: count }, () => Math.random() * (max - min) + min);
10701067
return values;
@@ -1078,8 +1075,8 @@ const zFloatGeneratorParseString = z.object({
10781075
values: z.array(z.number()).nullish(),
10791076
});
10801077
export type FloatGeneratorParseString = z.infer<typeof zFloatGeneratorParseString>;
1081-
export const getFloatGeneratorParseStringDefaults = () => zFloatGeneratorParseString.parse({});
1082-
export const getFloatGeneratorParseStringValues = (generator: FloatGeneratorParseString) => {
1078+
const getFloatGeneratorParseStringDefaults = () => zFloatGeneratorParseString.parse({});
1079+
const getFloatGeneratorParseStringValues = (generator: FloatGeneratorParseString) => {
10831080
const { input, splitOn } = generator;
10841081
const values = input
10851082
.split(splitOn)
@@ -1160,7 +1157,7 @@ const zIntegerGeneratorArithmeticSequence = z.object({
11601157
});
11611158
export type IntegerGeneratorArithmeticSequence = z.infer<typeof zIntegerGeneratorArithmeticSequence>;
11621159
export const getIntegerGeneratorArithmeticSequenceDefaults = () => zIntegerGeneratorArithmeticSequence.parse({});
1163-
export const getIntegerGeneratorArithmeticSequenceValues = (generator: IntegerGeneratorArithmeticSequence) => {
1160+
const getIntegerGeneratorArithmeticSequenceValues = (generator: IntegerGeneratorArithmeticSequence) => {
11641161
const { start, step, count } = generator;
11651162
if (step === 0) {
11661163
return [start];
@@ -1178,8 +1175,8 @@ const zIntegerGeneratorLinearDistribution = z.object({
11781175
values: z.array(z.number().int()).nullish(),
11791176
});
11801177
export type IntegerGeneratorLinearDistribution = z.infer<typeof zIntegerGeneratorLinearDistribution>;
1181-
export const getIntegerGeneratorLinearDistributionDefaults = () => zIntegerGeneratorLinearDistribution.parse({});
1182-
export const getIntegerGeneratorLinearDistributionValues = (generator: IntegerGeneratorLinearDistribution) => {
1178+
const getIntegerGeneratorLinearDistributionDefaults = () => zIntegerGeneratorLinearDistribution.parse({});
1179+
const getIntegerGeneratorLinearDistributionValues = (generator: IntegerGeneratorLinearDistribution) => {
11831180
const { start, end, count } = generator;
11841181
if (count === 1) {
11851182
return [start];
@@ -1197,11 +1194,8 @@ const zIntegerGeneratorUniformRandomDistribution = z.object({
11971194
values: z.array(z.number().int()).nullish(),
11981195
});
11991196
export type IntegerGeneratorUniformRandomDistribution = z.infer<typeof zIntegerGeneratorUniformRandomDistribution>;
1200-
export const getIntegerGeneratorUniformRandomDistributionDefaults = () =>
1201-
zIntegerGeneratorUniformRandomDistribution.parse({});
1202-
export const getIntegerGeneratorUniformRandomDistributionValues = (
1203-
generator: IntegerGeneratorUniformRandomDistribution
1204-
) => {
1197+
const getIntegerGeneratorUniformRandomDistributionDefaults = () => zIntegerGeneratorUniformRandomDistribution.parse({});
1198+
const getIntegerGeneratorUniformRandomDistributionValues = (generator: IntegerGeneratorUniformRandomDistribution) => {
12051199
const { min, max, count } = generator;
12061200
const values = Array.from({ length: count }, () => Math.floor(Math.random() * (max - min + 1)) + min);
12071201
return values;
@@ -1215,8 +1209,8 @@ const zIntegerGeneratorParseString = z.object({
12151209
values: z.array(z.number().int()).nullish(),
12161210
});
12171211
export type IntegerGeneratorParseString = z.infer<typeof zIntegerGeneratorParseString>;
1218-
export const getIntegerGeneratorParseStringDefaults = () => zIntegerGeneratorParseString.parse({});
1219-
export const getIntegerGeneratorParseStringValues = (generator: IntegerGeneratorParseString) => {
1212+
const getIntegerGeneratorParseStringDefaults = () => zIntegerGeneratorParseString.parse({});
1213+
const getIntegerGeneratorParseStringValues = (generator: IntegerGeneratorParseString) => {
12201214
const { input, splitOn } = generator;
12211215
const values = input
12221216
.split(splitOn)

invokeai/frontend/web/src/features/nodes/types/invocation.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ export const isBatchNode = (node: InvocationNode) => {
104104
}
105105
};
106106

107-
export const isGeneratorNode = (node: InvocationNode) => {
107+
const isGeneratorNode = (node: InvocationNode) => {
108108
switch (node.data.type) {
109109
case 'float_generator':
110110
case 'integer_generator':

0 commit comments

Comments
 (0)