@@ -88,7 +88,7 @@ def __init__(self, event_stats):
88
88
if not isinstance (event_stats , (list , tuple )):
89
89
raise ValueError ('Invalid data argument: {0}. Must be a list or tuple'
90
90
.format (event_stats ))
91
- if len ( event_stats ) > 0 and not isinstance (event_stats [0 ], EventStats ):
91
+ if event_stats and not isinstance (event_stats [0 ], EventStats ):
92
92
raise ValueError ('Invalid data argument: elements of event stats must be' +
93
93
' "EventStats", found{}' .format (type (event_stats [0 ])))
94
94
self ._stats = event_stats
@@ -114,10 +114,12 @@ def __init__(self, app):
114
114
115
115
def _populated_request (self , url , options ):
116
116
days = options .duration_days
117
- #pylint: disable-msg=too-many-arguments
118
- #this is due to six.urllib_parse incompatibility
119
- url_quoted = urllib_parse .quote (url , "" )
120
- #pylint: enable-msg=too-many-arguments
117
+ #pylint: disable=too-many-function-args
118
+ # This is due to six.urllib_parse incompatibility
119
+ #pylint: disable=redundant-keyword-arg
120
+ url_quoted = urllib_parse .quote (url , safe = "" )
121
+ #pylint: enable=redundant-keyword-arg
122
+ #pylint: enable=too-many-function-args
121
123
return self ._links_request .format (url_quoted , days )
122
124
123
125
def get_stats (self , url , options ):
0 commit comments