怎么简单继承第三方库?
继承库,不是类!
import uiautomator2
class expand(uiautomator2):
def unlock(self):
d.screen_on()
for i in range(23):
if d.info['currentPackageName'] in ['com.android.systemui', 'android']: #
logging.info('解锁屏幕')
d.swipe_ext("up", scale=0.9)
d.unlock()
else:
logging.info('已解锁')
return True
time.sleep(1)
TypeError: module() takes at most 2 arguments (3 given)
会出错!我想给库加个功能,不想修改库,不然每次升级都要去修改!
找遍了,都是说怎么继承类的
推荐文章: