Skip to content

Commit bcf5bdd

Browse files
authored
Remove unnecessary check for None (DataDog#20777)
The variable can never be `None`
1 parent 9582169 commit bcf5bdd

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

kafka_consumer/datadog_checks/kafka_consumer/kafka_consumer.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -259,7 +259,7 @@ def report_consumer_offsets_and_lag(
259259

260260
partitions = self.client.get_partitions_for_topic(topic)
261261
self.log.debug("Received partitions %s for topic %s", partitions, topic)
262-
if partitions is not None and partition in partitions:
262+
if partition in partitions:
263263
# report consumer offset if the partition is valid because even if leaderless
264264
# the consumer offset will be valid once the leader failover completes
265265
self.gauge('consumer_offset', consumer_offset, tags=consumer_group_tags)

0 commit comments

Comments
 (0)