Skip to content
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
fix pylint issues
  • Loading branch information
nhausman1 committed Nov 17, 2019
commit 44a658484d0998e26610e9767a5004d9e7eff3b7
8 changes: 5 additions & 3 deletions splitio/client/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -366,7 +366,7 @@ def _record_stats(self, impressions, start, operation):
self._logger.error('Error recording impressions and metrics')
self._logger.debug('Error: ', exc_info=True)

def track(self, key, traffic_type, event_type, value=None, properties=None, timestamp=None):
def track(self, key, traffic_type, event_type, value=None, properties=None, timestamp=None): # pylint: disable=too-many-arguments
"""
Track an event.

Expand All @@ -380,7 +380,8 @@ def track(self, key, traffic_type, event_type, value=None, properties=None, time
:type value: Number
:param properties: (Optional) properties associated to the event
:type properties: dict
:param timestamp: (Optional) Represents the time in milliseconds since epoch that the event occurred
:param timestamp: (Optional) Represents the time in milliseconds since epoch that the event
occurred
:type properties: int

:return: Whether the event was created or not.
Expand All @@ -403,12 +404,13 @@ def track(self, key, traffic_type, event_type, value=None, properties=None, time
valid, properties, size = input_validator.valid_properties(properties)
timestamp = input_validator.validate_timestamp(timestamp)

# pylint: disable=too-many-boolean-expressions
if key is None or event_type is None or traffic_type is None or value is False \
or valid is False or timestamp is False:
return False

if timestamp is None:
timestamp=int(time.time()*1000)
timestamp = int(time.time()*1000)

event = Event(
key=key,
Expand Down