提交 ed82f1c5 编写于 作者: A AUTOMATIC1111

lint

上级 420cc8f6
......@@ -213,7 +213,7 @@ for key, metadata in opts.data_labels.items():
value = None
optType = opts.typemap.get(type(metadata.default), type(value))
if optType == types.NoneType:
if isinstance(optType, types.NoneType):
pass
elif metadata is not None:
fields.update({key: (Optional[optType], Field(default=metadata.default, description=metadata.label))})
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册