Skip to content

Commit

Permalink
build(pylint): unpin pylint from 2.4.4 and fix build for 2.5.x
Browse files Browse the repository at this point in the history
  • Loading branch information
anonymoose2 authored and theo-o committed May 5, 2020
1 parent 522108c commit e274d32
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ install:
- npm install sass
- pip install -U pip setuptools
- pip install -U -r requirements.txt
- pip install -U coveralls flake8 pylint==2.4.4 pylint-django pylint-plugin-utils codacy-coverage isort black autopep8
- pip install -U coveralls flake8 pylint pylint-django pylint-plugin-utils codacy-coverage isort black autopep8
before_script:
- cp intranet/settings/travis_secret.py intranet/settings/secret.py
- sudo systemctl start rabbitmq-server
Expand Down
10 changes: 5 additions & 5 deletions intranet/apps/eighth/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -604,7 +604,7 @@ class EighthBlock(AbstractBaseEighthModel):

history = HistoricalRecords()

def save(self, *args, **kwargs): # pylint: disable=arguments-differ
def save(self, *args, **kwargs): # pylint: disable=signature-differs
"""Capitalize the first letter of the block name."""
letter = getattr(self, "block_letter", None)
if letter and len(letter) >= 1:
Expand Down Expand Up @@ -1650,7 +1650,7 @@ def cancel(self):
self.save(update_fields=["cancelled"])

if not self.is_both_blocks or self.block.block_letter != "B":
from .notifications import activity_cancelled_email # pylint: disable=import-outside-toplevel
from .notifications import activity_cancelled_email # pylint: disable=import-outside-toplevel,cyclic-import

activity_cancelled_email(self)

Expand All @@ -1666,7 +1666,7 @@ def uncancel(self):
self.cancelled = False
self.save(update_fields=["cancelled"])

def save(self, *args, **kwargs): # pylint: disable=arguments-differ
def save(self, *args, **kwargs): # pylint: disable=signature-differs
super(EighthScheduledActivity, self).save(*args, **kwargs)

class Meta:
Expand Down Expand Up @@ -1778,7 +1778,7 @@ class EighthSignup(AbstractBaseEighthModel):

archived_was_absent = models.BooleanField(default=False, blank=True)

def save(self, *args, **kwargs): # pylint: disable=arguments-differ
def save(self, *args, **kwargs): # pylint: disable=signature-differs
if self.has_conflict(nocache=True):
logger.error(
"Duplicate signup while saving signup %d for user %d in activity %d, block %d, scheduled activity %d",
Expand All @@ -1795,7 +1795,7 @@ def save(self, *args, **kwargs): # pylint: disable=arguments-differ

history = HistoricalRecords()

def validate_unique(self, *args, **kwargs): # pylint: disable=arguments-differ
def validate_unique(self, *args, **kwargs): # pylint: disable=signature-differs
"""Checked whether more than one EighthSignup exists for a User on a given EighthBlock."""
super(EighthSignup, self).validate_unique(*args, **kwargs)

Expand Down
2 changes: 1 addition & 1 deletion intranet/apps/eighth/views/admin/attendance.py
Original file line number Diff line number Diff line change
Expand Up @@ -320,7 +320,7 @@ def migrate_outstanding_passes_view(request):
activity.administrative = True

if not activity.description:
activity.description = "Pass received from the 8th period " "office was not turned in."
activity.description = "Pass received from the 8th period office was not turned in."

activity.save()
invalidate_obj(activity)
Expand Down
2 changes: 1 addition & 1 deletion intranet/apps/polls/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -264,4 +264,4 @@ class AnswerVote(models.Model): # record of total selection of a given answer c
is_writing = models.BooleanField(default=False) # enables distinction between writing/std answers

def __str__(self):
return self.choice
return str(self.choice)
2 changes: 1 addition & 1 deletion intranet/utils/deletion.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@


def set_historical_user(collector, field, sub_objs, using):
from intranet.apps.eighth.models import EighthSignup, EighthSponsor # pylint: disable=import-outside-toplevel
from intranet.apps.eighth.models import EighthSignup, EighthSponsor # pylint: disable=import-outside-toplevel,cyclic-import

teststaff, _ = get_user_model().objects.get_or_create(id=7011)
for obj in sub_objs:
Expand Down

0 comments on commit e274d32

Please sign in to comment.