Skip to content

Commit

Permalink
Adjust typing references
Browse files Browse the repository at this point in the history
  • Loading branch information
JustMaier committed Feb 7, 2023
1 parent 68a5374 commit 245769f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
3 changes: 2 additions & 1 deletion civitai/models.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
from enum import Enum
from typing import List
from pydantic import BaseModel, Field

class ResourceTypes(str, Enum):
Expand Down Expand Up @@ -53,7 +54,7 @@ class CommandActivitiesList(Command):

class CommandResourcesList(Command):
type: CommandTypes = Field(default=CommandTypes.ResourcesList, title="Type", description="The type of command to execute.")
types: list[ResourceTypes] = Field(default=[], title="Types", description="The types of resources to list.")
types: List[ResourceTypes] = Field(default=[], title="Types", description="The types of resources to list.")

class CommandResourcesAdd(Command):
type: CommandTypes = Field(default=CommandTypes.ResourcesAdd, title="Type", description="The type of command to execute.")
Expand Down
5 changes: 3 additions & 2 deletions scripts/main.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# main ui
from datetime import datetime, timezone
import time
from typing import List
import gradio as gr
import socketio
import os
Expand Down Expand Up @@ -29,8 +30,8 @@ def on_activities_clear(payload: CommandActivitiesList):
command_response(payload)

report_interval = 1
processing_activites: list[str] = []
should_cancel_activity: list[str] = []
processing_activites: List[str] = []
should_cancel_activity: List[str] = []
def on_resources_add(payload: CommandResourcesAdd):
resource = payload['resource']
payload['status'] = 'processing'
Expand Down

0 comments on commit 245769f

Please sign in to comment.