utils/drifted_frq: Use python3 round builtin (W1633)
This changes the used rounding strategy. See "Whats new in python3"[1] for more details: > Exact halfway cases are now rounded to the nearest even result > instead of away from zero. > (For example, round(2.5) now returns 2 rather than 3.) Fixes round-builtin (W1633) pylint error. [1]: https://docs.python.org/3/whatsnew/3.0.html#builtins Signed-off-by: Fabian P. Schmidt <kerel@mailbox.org>merge-requests/853/head
parent
af9f9bf8e9
commit
e1ed302e64
|
@ -12,5 +12,3 @@ disable=
|
|||
R0914, # too-many-locals
|
||||
W0201, # attribute-defined-outside-init
|
||||
W0703, # broad-except
|
||||
# py3k transition issues:
|
||||
W1633, # round-builtin
|
||||
|
|
|
@ -4,6 +4,7 @@ from __future__ import absolute_import, division
|
|||
|
||||
from collections import defaultdict
|
||||
|
||||
from future.builtins import round
|
||||
from rest_framework import serializers
|
||||
|
||||
from network.base.db_api import DBConnectionError, get_transmitters_by_uuid_set
|
||||
|
|
|
@ -3,6 +3,7 @@ from __future__ import absolute_import, division
|
|||
|
||||
from django import template
|
||||
from django.core.urlresolvers import reverse
|
||||
from future.builtins import round
|
||||
|
||||
register = template.Library()
|
||||
|
||||
|
|
Loading…
Reference in New Issue