1
0
Fork 0

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
Fabian P. Schmidt 2019-12-31 00:27:42 +01:00
parent af9f9bf8e9
commit e1ed302e64
3 changed files with 2 additions and 2 deletions

View File

@ -12,5 +12,3 @@ disable=
R0914, # too-many-locals
W0201, # attribute-defined-outside-init
W0703, # broad-except
# py3k transition issues:
W1633, # round-builtin

View File

@ -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

View File

@ -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()