From 853381a5dce0f0ec1ad0c20583110f5c77e1ec5f Mon Sep 17 00:00:00 2001 From: Pierros Papadeas Date: Fri, 12 Jul 2019 09:20:01 +0300 Subject: [PATCH] Fix pylint C1801 errors Signed-off-by: Pierros Papadeas --- .pylintrc | 1 - db/base/utils.py | 4 ++-- db/base/views.py | 2 +- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/.pylintrc b/.pylintrc index ae07a29..5634f74 100644 --- a/.pylintrc +++ b/.pylintrc @@ -10,7 +10,6 @@ disable= C0411, C0412, C0325, - C1801, E1101, E0213, R0101, diff --git a/db/base/utils.py b/db/base/utils.py index 714f998..3c12503 100644 --- a/db/base/utils.py +++ b/db/base/utils.py @@ -47,9 +47,9 @@ def calculate_statistics(): mode_data.append(tr) # needed to pass testing in a fresh environment with no modes in db - if len(mode_label) == 0: + if not mode_label: mode_label = ['FM'] - if len(mode_data) == 0: + if not mode_data: mode_data = ['FM'] band_label = [] diff --git a/db/base/views.py b/db/base/views.py index 6697608..cffc138 100644 --- a/db/base/views.py +++ b/db/base/views.py @@ -128,7 +128,7 @@ def transmitter_suggestion(request): transmitter.reviewed = False transmitter.approved = False uuid = transmitter_form.cleaned_data['uuid'] - if uuid is not None and len(uuid) > 0: + if uuid: transmitter.uuid = uuid transmitter.save()