Completed
Pull Request — master (#527)
by
unknown
02:48
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
class WechatApplication:
3
    def __init__(self,**kwargs):
0 ignored issues
show
Coding Style introduced by
Exactly one space required after comma
def __init__(self,**kwargs):
^
Loading history...
4
        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...
5
        self.description = kwargs['description']
6
        self.allow_userinfos = kwargs['allow_userinfos']['user']
7
        self.allow_partys = kwargs['allow_partys']['partyid']
8
        self.allow_tags = kwargs['allow_tags']['tagid']
9
        self.close = kwargs['close']
10
        self.redirect_domain = kwargs['redirect_domain']
11
        self.report_location_flag = kwargs['report_location_flag']
12
        self.isreportuser = kwargs['isreportuser']
13
        self.isreportenter = kwargs['isreportenter']
14
        self.chat_extension_url = kwargs['chat_extension_url']
15
        self.type = kwargs['type']
16
17
    def getagentid(self):
18
        return self.appinfo.getagentid()
19
20
    def getallow_userinfos(self):
21
        return self.getallow_userinfos()
22
23
    def getallow_partys(self):
24
        return self.allow_partys
25
26
    def getallow_tags(self):
27
        return self.allow_tags
0 ignored issues
show
Coding Style introduced by
Final newline missing
Loading history...