1
0
Fork 0

move py2 lint exceptions to .pylintrc

Ignore py2-specific linting errors in .pylintrc while testing them in .pylintrc3

Signed-off-by: Corey Shields <cshields@gmail.com>
merge-requests/402/head
Corey Shields 2019-08-10 15:53:00 -04:00
parent f80f207c78
commit 6920bbab03
5 changed files with 4 additions and 12 deletions

View File

@ -5,4 +5,6 @@ ignored-argument-names=args|kwargs
[MESSAGES CONTROL]
disable=
C0412,
E1101,
R0801, # needs to remain disabled see https://github.com/PyCQA/pylint/issues/214

View File

@ -5,9 +5,4 @@ load-plugins=pylint_django
[MESSAGES CONTROL]
disable=
C0412,
R0401,
R0801,
R0901,
R0903,
R0914,
W0511,

View File

@ -114,9 +114,8 @@ class Satellite(models.Model):
:returns: the valid transmitters for this Satellite
"""
# Remove the following pylint disable after Python 3 migration
transmitters = Transmitter.objects.filter(satellite=self.id)
return transmitters.exclude(status='invalid') # pylint: disable=E1101
return transmitters.exclude(status='invalid')
@property
def transmitter_suggestion_count(self):

View File

@ -11,8 +11,7 @@ import pytest
from django.contrib.auth.models import User
from django.test import TestCase
from django.utils.timezone import now
# C0412 below clashes with isort
from factory import fuzzy # pylint: disable=C0412
from factory import fuzzy
from db.base.models import DATA_SOURCES, DemodData, Mode, Satellite, \
Telemetry, Transmitter, TransmitterSuggestion

View File

@ -4,9 +4,6 @@ For local installation settings please copy .env-dist to .env and edit
the appropriate settings in that file. You should not need to edit this
file for local settings!
"""
# C0412 below clashes with isort in a way that prevents inline disabling
# for the DjangoIntegration import
# pylint: disable=C0412
from __future__ import absolute_import, division, print_function, \
unicode_literals