fix: python3.9 Union
This commit is contained in:
		
							parent
							
								
									63f154c540
								
							
						
					
					
						commit
						c1c8e6ff3d
					
				|  | @ -39,15 +39,15 @@ class StreamOut(BaseModel): | |||
|     stream_out: bool = Field(..., alias="streamOut") | ||||
| 
 | ||||
| 
 | ||||
| InputFile = Union[LocalFile | MemoryFile | PreparedFile | Symlink] | ||||
| InputFile = Union[LocalFile, MemoryFile, PreparedFile, Symlink] | ||||
| 
 | ||||
| 
 | ||||
| class Cmd(BaseModel): | ||||
|     args: List[str] = [] | ||||
|     env: List[str] = [] | ||||
|     stdin: Union[InputFile | StreamIn] = MemoryFile(content="") | ||||
|     stdout: Union[Collector | StreamOut] = Collector(name="stdout") | ||||
|     stderr: Union[Collector | StreamOut] = Collector(name="stderr") | ||||
|     stdin: Union[InputFile, StreamIn] = MemoryFile(content="") | ||||
|     stdout: Union[Collector, StreamOut] = Collector(name="stdout") | ||||
|     stderr: Union[Collector, StreamOut] = Collector(name="stderr") | ||||
|     cpu_limit: int = Field(DEFAULT_CPU_LIMIT, serialization_alias="cpuLimit") | ||||
|     clock_limit: int = Field(2 * DEFAULT_CPU_LIMIT, serialization_alias="clockLimit") | ||||
|     memory_limit: int = Field(DEFAULT_MEMORY_LIMIT, serialization_alias="memoryLimit") | ||||
|  | @ -71,9 +71,9 @@ class Cmd(BaseModel): | |||
| class OptionalCmd(BaseModel): | ||||
|     args: Optional[List[str]] = None | ||||
|     env: Optional[List[str]] = None | ||||
|     stdin: Optional[Union[InputFile | StreamIn]] = None | ||||
|     stdout: Optional[Union[Collector | StreamOut]] = None | ||||
|     stderr: Optional[Union[Collector | StreamOut]] = None | ||||
|     stdin: Optional[Union[InputFile, StreamIn]] = None | ||||
|     stdout: Optional[Union[Collector, StreamOut]] = None | ||||
|     stderr: Optional[Union[Collector, StreamOut]] = None | ||||
|     cpu_limit: Optional[int] = Field(None, serialization_alias="cpuLimit") | ||||
|     clock_limit: Optional[int] = Field(None, serialization_alias="clockLimit") | ||||
|     memory_limit: Optional[int] = Field(None, serialization_alias="memoryLimit") | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue
	
	Block a user