各种 Anti-warning 合规性改动
This commit is contained in:
@@ -7,9 +7,9 @@ from HelperLogInOut import apiLogin, apiLogout, generateTimestamp
|
||||
from HelperUnlockThing import implUnlockThing
|
||||
|
||||
def implUnlockSingleItem(itemId: int, itemKind: int, userId: int, currentLoginTimestamp:int, currentLoginResult) -> str:
|
||||
'''
|
||||
"""
|
||||
发单个东西,比如搭档 10
|
||||
'''
|
||||
"""
|
||||
userItemList = [
|
||||
{
|
||||
"itemKind": itemKind,
|
||||
@@ -22,9 +22,9 @@ def implUnlockSingleItem(itemId: int, itemKind: int, userId: int, currentLoginTi
|
||||
return unlockThingResult
|
||||
|
||||
def implUnlockMusic(musicToBeUnlocked: int, userId: int, currentLoginTimestamp:int, currentLoginResult) -> str:
|
||||
'''
|
||||
"""
|
||||
解锁乐曲
|
||||
'''
|
||||
"""
|
||||
userItemList = [
|
||||
{
|
||||
"itemKind": 5,
|
||||
@@ -41,22 +41,3 @@ def implUnlockMusic(musicToBeUnlocked: int, userId: int, currentLoginTimestamp:i
|
||||
]
|
||||
unlockThingResult = implUnlockThing(userItemList, userId, currentLoginTimestamp, currentLoginResult)
|
||||
return unlockThingResult
|
||||
|
||||
if __name__ == "__main__":
|
||||
userId = testUid
|
||||
currentLoginTimestamp = generateTimestamp()
|
||||
loginResult = apiLogin(currentLoginTimestamp, userId)
|
||||
|
||||
# Change you want item ID
|
||||
wantToUnlockItemId = 11538
|
||||
|
||||
if loginResult['returnCode'] != 1:
|
||||
logger.info("登录失败")
|
||||
exit()
|
||||
try:
|
||||
# Change you want to unlock music or something
|
||||
logger.info(implUnlockMusic(wantToUnlockItemId, userId, currentLoginTimestamp, loginResult))
|
||||
logger.info(apiLogout(currentLoginTimestamp, userId))
|
||||
except:
|
||||
logger.info(apiLogout(currentLoginTimestamp, userId))
|
||||
logger.warning("Error")
|
||||
|
||||
Reference in New Issue
Block a user