mirror of
https://gitee.com/sui-feng-cb/AzurLaneAutoScript1
synced 2026-04-03 00:41:13 +08:00
Add: [ALAS] set_cached_property
This commit is contained in:
@@ -123,6 +123,18 @@ def has_cached_property(obj, name):
|
|||||||
return name in obj.__dict__
|
return name in obj.__dict__
|
||||||
|
|
||||||
|
|
||||||
|
def set_cached_property(obj, name, value):
|
||||||
|
"""
|
||||||
|
Set a cached property.
|
||||||
|
|
||||||
|
Args:
|
||||||
|
obj:
|
||||||
|
name (str):
|
||||||
|
value:
|
||||||
|
"""
|
||||||
|
obj.__dict__[name] = value
|
||||||
|
|
||||||
|
|
||||||
def function_drop(rate=0.5, default=None):
|
def function_drop(rate=0.5, default=None):
|
||||||
"""
|
"""
|
||||||
Drop function calls to simulate random emulator stuck, for testing purpose.
|
Drop function calls to simulate random emulator stuck, for testing purpose.
|
||||||
|
|||||||
Reference in New Issue
Block a user