mirror of
https://github.com/zulip/zulip.git
synced 2025-11-06 06:53:25 +00:00
pep8: Add compliance with rule E261 to analytics/models.py.
This commit is contained in:
committed by
Tim Abbott
parent
13d9b98c39
commit
2ca1f60ac5
@@ -9,15 +9,15 @@ import datetime
|
|||||||
from typing import Optional, Tuple, Union, Dict, Any, Text
|
from typing import Optional, Tuple, Union, Dict, Any, Text
|
||||||
|
|
||||||
class FillState(ModelReprMixin, models.Model):
|
class FillState(ModelReprMixin, models.Model):
|
||||||
property = models.CharField(max_length=40, unique=True) # type: Text
|
property = models.CharField(max_length=40, unique=True) # type: Text
|
||||||
end_time = models.DateTimeField() # type: datetime.datetime
|
end_time = models.DateTimeField() # type: datetime.datetime
|
||||||
|
|
||||||
# Valid states are {DONE, STARTED}
|
# Valid states are {DONE, STARTED}
|
||||||
DONE = 1
|
DONE = 1
|
||||||
STARTED = 2
|
STARTED = 2
|
||||||
state = models.PositiveSmallIntegerField() # type: int
|
state = models.PositiveSmallIntegerField() # type: int
|
||||||
|
|
||||||
last_modified = models.DateTimeField(auto_now=True) # type: datetime.datetime
|
last_modified = models.DateTimeField(auto_now=True) # type: datetime.datetime
|
||||||
|
|
||||||
def __unicode__(self):
|
def __unicode__(self):
|
||||||
# type: () -> Text
|
# type: () -> Text
|
||||||
@@ -41,7 +41,7 @@ def last_successful_fill(property):
|
|||||||
|
|
||||||
# would only ever make entries here by hand
|
# would only ever make entries here by hand
|
||||||
class Anomaly(ModelReprMixin, models.Model):
|
class Anomaly(ModelReprMixin, models.Model):
|
||||||
info = models.CharField(max_length=1000) # type: Text
|
info = models.CharField(max_length=1000) # type: Text
|
||||||
|
|
||||||
def __unicode__(self):
|
def __unicode__(self):
|
||||||
# type: () -> Text
|
# type: () -> Text
|
||||||
@@ -51,11 +51,11 @@ class BaseCount(ModelReprMixin, models.Model):
|
|||||||
# Note: When inheriting from BaseCount, you may want to rearrange
|
# Note: When inheriting from BaseCount, you may want to rearrange
|
||||||
# the order of the columns in the migration to make sure they
|
# the order of the columns in the migration to make sure they
|
||||||
# match how you'd like the table to be arranged.
|
# match how you'd like the table to be arranged.
|
||||||
property = models.CharField(max_length=32) # type: Text
|
property = models.CharField(max_length=32) # type: Text
|
||||||
subgroup = models.CharField(max_length=16, null=True) # type: Text
|
subgroup = models.CharField(max_length=16, null=True) # type: Text
|
||||||
end_time = models.DateTimeField() # type: datetime.datetime
|
end_time = models.DateTimeField() # type: datetime.datetime
|
||||||
value = models.BigIntegerField() # type: int
|
value = models.BigIntegerField() # type: int
|
||||||
anomaly = models.ForeignKey(Anomaly, null=True) # type: Optional[Anomaly]
|
anomaly = models.ForeignKey(Anomaly, null=True) # type: Optional[Anomaly]
|
||||||
|
|
||||||
class Meta(object):
|
class Meta(object):
|
||||||
abstract = True
|
abstract = True
|
||||||
|
|||||||
Reference in New Issue
Block a user