Skip to content

Commit

Permalink
Remove old py2 compatibiity
Browse files Browse the repository at this point in the history
  • Loading branch information
mdoucet committed Jun 12, 2020
1 parent a79f4fc commit 0723083
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions django_remote_submission/models.py
Expand Up @@ -26,7 +26,6 @@
from django.db import models
from django.utils.translation import ugettext_lazy as _
from django.conf import settings
from django.utils.encoding import python_2_unicode_compatible
from django.core.exceptions import ValidationError

from model_utils import Choices
Expand All @@ -50,7 +49,7 @@ def to_python(self, value): # noqa: D102

return ast.literal_eval(value)

def from_db_value(self, value, expression, connection, context): # noqa: D102
def from_db_value(self, value, *args, **kwargs): # noqa: D102
return self.to_python(value)

def get_prep_value(self, value): # noqa: D102
Expand All @@ -64,7 +63,6 @@ def value_to_string(self, obj): # noqa: D102
return self.get_db_prep_value(value)


@python_2_unicode_compatible
class Interpreter(TimeStampedModel):
"""Encapsulates the executable and required arguments for each interpreter.
Expand Down Expand Up @@ -106,7 +104,6 @@ def __str__(self):
return '{self.name} ({self.path})'.format(self=self)


@python_2_unicode_compatible
class Server(TimeStampedModel):
"""Encapsulates the remote server identifiers.
Expand Down Expand Up @@ -159,7 +156,6 @@ def __str__(self):
return '{self.title} <{self.hostname}:{self.port}>'.format(self=self)


@python_2_unicode_compatible
class Job(TimeStampedModel):
"""Encapsulates the information about a particular job.
Expand Down Expand Up @@ -317,7 +313,6 @@ def clean(self):



@python_2_unicode_compatible
class Log(models.Model):
"""Encapsulates a log message printed from a job.
Expand Down Expand Up @@ -396,7 +391,6 @@ def job_result_path(instance, filename):
return 'results/{}/{}'.format(instance.job.uuid, filename)


@python_2_unicode_compatible
class Result(TimeStampedModel):
"""Encapsulates a resulting file produced by a job.
Expand Down

0 comments on commit 0723083

Please sign in to comment.