mirror of
https://github.com/HIllya51/LunaTranslator.git
synced 2024-12-29 16:44:13 +08:00
or
This commit is contained in:
parent
480dc6b049
commit
8b8f117e70
@ -1085,9 +1085,7 @@ class MAINUI:
|
||||
== Qt.WindowType.FramelessWindowHint
|
||||
):
|
||||
return
|
||||
if isinstance(widget, QMenu):
|
||||
return
|
||||
if isinstance(widget, QFrame):
|
||||
if isinstance(widget, (QMenu, QFrame)):
|
||||
return
|
||||
if (
|
||||
isinstance(widget, QWidget)
|
||||
|
@ -37,7 +37,7 @@ class Textbrowser(QLabel):
|
||||
"错误",
|
||||
"can't find Webview2 runtime!",
|
||||
)
|
||||
elif isinstance(e, ImportError) or isinstance(e, ModuleNotFoundError):
|
||||
elif isinstance(e, (ImportError, ModuleNotFoundError)):
|
||||
getQMessageBox(
|
||||
None,
|
||||
"错误",
|
||||
|
@ -1392,7 +1392,7 @@ def makeforms(lay: LFormLayout, lis, args):
|
||||
name, wid = None, line[0]
|
||||
else:
|
||||
name, wid = line
|
||||
if isinstance(wid, tuple) or isinstance(wid, list):
|
||||
if isinstance(wid, (tuple, list)):
|
||||
hb = QHBoxLayout()
|
||||
hb.setContentsMargins(0, 0, 0, 0)
|
||||
if Stretch:
|
||||
|
@ -220,7 +220,7 @@ for uid in savehook_new_data:
|
||||
for k in _dfsavehook:
|
||||
if k not in savehook_new_data[uid]:
|
||||
__v = _dfsavehook[k]
|
||||
if isinstance(_dfsavehook[k], list) or isinstance(_dfsavehook[k], dict):
|
||||
if isinstance(_dfsavehook[k], (list, dict)):
|
||||
__v = __v.copy()
|
||||
savehook_new_data[uid][k] = __v
|
||||
|
||||
|
@ -321,7 +321,7 @@ class Requester_common:
|
||||
disposition = b'Content-Disposition: form-data; name="'
|
||||
disposition += name.encode("utf8")
|
||||
disposition += b'"'
|
||||
if isinstance(data, tuple) or isinstance(data, list):
|
||||
if isinstance(data, (tuple, list)):
|
||||
if len(data) == 3:
|
||||
filename, data, type_ = data
|
||||
elif len(data) == 2:
|
||||
|
Loading…
x
Reference in New Issue
Block a user