mirror of
https://gitee.com/sui-feng-cb/AzurLaneAutoScript1
synced 2026-03-12 14:27:00 +08:00
Fix: Stop scheduler if a task failed 3 or more times
- Add: Clear click record - Opt: Check the type of user setting and display invalid settings
This commit is contained in:
@@ -439,3 +439,19 @@ def to_list(text, length=1):
|
||||
return [int(text)] * length
|
||||
out = [int(letter.strip()) for letter in text.split(',')]
|
||||
return out
|
||||
|
||||
|
||||
def type_to_str(typ):
|
||||
"""
|
||||
Convert any types or any objects to a string。
|
||||
Remove <> to prevent them from being parsed as HTML tags.
|
||||
|
||||
Args:
|
||||
typ:
|
||||
|
||||
Returns:
|
||||
str: Such as `int`, 'datetime.datetime'.
|
||||
"""
|
||||
if not isinstance(typ, type):
|
||||
typ = type(typ)
|
||||
return str(typ).strip("<class '>").replace('<', '_').replace('>', '_')
|
||||
|
||||
Reference in New Issue
Block a user