From 9c7953433b14446eaba1657ba3e452378a2c852c Mon Sep 17 00:00:00 2001 From: Alvaro Leonel Date: Wed, 30 May 2018 23:59:07 -0300 Subject: [PATCH] Improve code quality on utils.py --- notifications/utils.py | 10 ++++++---- notifications/views.py | 1 + 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/notifications/utils.py b/notifications/utils.py index d106009..51f20ee 100644 --- a/notifications/utils.py +++ b/notifications/utils.py @@ -1,13 +1,15 @@ +'''' Django notifications utils file ''' # -*- coding: utf-8 -*- - import sys + + if sys.version > '3': - long = int + long = int # pylint: disable=invalid-name def slug2id(slug): return long(slug) - 110909 -def id2slug(id): - return id + 110909 +def id2slug(notification_id): + return notification_id + 110909 diff --git a/notifications/views.py b/notifications/views.py index a823797..2fd2e46 100644 --- a/notifications/views.py +++ b/notifications/views.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- ''' Django Notifications exemple views ''' from distutils.version import StrictVersion # pylint: disable=no-name-in-module,import-error