Skip to content

Commit a778b93

Browse files
committed
Updates for pylint
1 parent 8a8e628 commit a778b93

2 files changed

Lines changed: 5 additions & 5 deletions

File tree

network_importer/performance.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -50,16 +50,16 @@ def print_from_ms(msec) -> str:
5050
millis = msec - (ms_per_min * minutes) - (ms_per_sec * seconds)
5151

5252
if minutes == 0 and seconds == 0:
53-
return "%dms" % (millis)
53+
return f"{millis}ms"
5454
if minutes == 0:
55-
return "%ds %dms" % (seconds, millis)
55+
return f"{seconds}s {millis}ms"
5656

57-
return "%dm %ds %dms" % (minutes, seconds, millis)
57+
return f"{minutes}m {seconds}s {millis}ms"
5858

5959

6060
def timeit(method):
6161
"""Decorator to record the execution time of a function."""
62-
global TIME_TRACKER
62+
global TIME_TRACKER # pylint: disable=global-variable-not-assigned
6363

6464
def timed(*args, **kw):
6565
"""Decorator to record the execution time of a function and store the result in TIME_TRACKER."""

tests/unit/test_utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ def test_sort_by_digits():
3737
6,
3838
)
3939
assert sort_by_digits("Eth0") == (0,)
40-
assert sort_by_digits("Eth") == ()
40+
assert not sort_by_digits("Eth")
4141

4242

4343
def test_is_interface_physical():

0 commit comments

Comments
 (0)