Skip to content

Commit 42c5041

Browse files
committed
Fix flake8 warning
There are actually two warnings. one about "global points" being unused, as this is only used for reading not for assignment, the global is not necessary. The second is about the mutable argument default
1 parent 4299961 commit 42c5041

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

metrics.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -94,8 +94,9 @@ def search_paginated_generator(apiurl, queries=None, **kwargs):
9494
points = []
9595

9696

97-
def point(measurement, fields, datetime, tags={}, delta=False):
98-
global points
97+
def point(measurement, fields, datetime, tags=None, delta=False):
98+
if tags is None:
99+
tags = {}
99100
points.append(Point(measurement, tags, fields, timestamp(datetime), delta))
100101

101102

0 commit comments

Comments
 (0)