Completed
Pull Request — master (#554)
by
unknown
03:07
created

WechatApplication.__init__()   A

Complexity

Conditions 1

Size

Total Lines 13

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
c 1
b 0
f 0
dl 0
loc 13
rs 9.4285
1
from lib.wechatutil.appinfo import AppInfo
2
3
4
class WechatApplication:
5
    def __init__(self, **kwargs):
6
        self.appinfo = AppInfo(kwargs)
0 ignored issues
show
Bug introduced by
There seem to be too many positional arguments for this constructor call.
Loading history...
7
        self.description = kwargs['description']
8
        self.allow_userinfos = kwargs['allow_userinfos']['user']
9
        self.allow_partys = kwargs['allow_partys']['partyid']
10
        self.allow_tags = kwargs['allow_tags']['tagid']
11
        self.close = kwargs['close']
12
        self.redirect_domain = kwargs['redirect_domain']
13
        self.report_location_flag = kwargs['report_location_flag']
14
        self.isreportuser = kwargs['isreportuser']
15
        self.isreportenter = kwargs['isreportenter']
16
        self.chat_extension_url = kwargs['chat_extension_url']
17
        self.type = kwargs['type']
18
19
    def getagentid(self):
20
        return self.appinfo.getagentid()
21
22
    def getallow_userinfos(self):
23
        return self.getallow_userinfos()
24
25
    def getallow_partys(self):
26
        return self.allow_partys
27
28
    def getallow_tags(self):
29
        return self.allow_tags
30