Skip to content

Commit 2e60423

Browse files
Merge pull request #4329 from Blucknote/patch-1
Python 3.8 typing compatibility
2 parents a546e2a + a170e3d commit 2e60423

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

modules/api/models.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
from inflection import underscore
66
from modules.processing import StableDiffusionProcessingTxt2Img, StableDiffusionProcessingImg2Img
77
from modules.shared import sd_upscalers, opts, parser
8-
from typing import List
8+
from typing import Dict, List
99

1010
API_NOT_ALLOWED = [
1111
"self",
@@ -193,8 +193,8 @@ class ProgressResponse(BaseModel):
193193

194194
class SamplerItem(BaseModel):
195195
name: str = Field(title="Name")
196-
aliases: list[str] = Field(title="Aliases")
197-
options: dict[str, str] = Field(title="Options")
196+
aliases: List[str] = Field(title="Aliases")
197+
options: Dict[str, str] = Field(title="Options")
198198

199199
class UpscalerItem(BaseModel):
200200
name: str = Field(title="Name")
@@ -230,4 +230,4 @@ class PromptStyleItem(BaseModel):
230230
class ArtistItem(BaseModel):
231231
name: str = Field(title="Name")
232232
score: float = Field(title="Score")
233-
category: str = Field(title="Category")
233+
category: str = Field(title="Category")

0 commit comments

Comments
 (0)