mirror of
https://github.com/zulip/zulip.git
synced 2025-11-13 18:36:36 +00:00
Add annotations to avatar.py, db.py, logging_util.py, unminify.py.
Also, fixed a a small type annotation in users.py because email must be a string because emails don't support UTF-8 at this time (according a comment in gravatar_hash in avatar.py).
This commit is contained in:
@@ -9,6 +9,7 @@ class _RateLimitFilter(object):
|
||||
last_error = datetime.min
|
||||
|
||||
def filter(self, record):
|
||||
# type: (logging.LogRecord) -> bool
|
||||
from django.conf import settings
|
||||
from django.core.cache import cache
|
||||
|
||||
@@ -44,9 +45,11 @@ class EmailLimiter(_RateLimitFilter):
|
||||
|
||||
class ReturnTrue(logging.Filter):
|
||||
def filter(self, record):
|
||||
# type: (logging.LogRecord) -> bool
|
||||
return True
|
||||
|
||||
class RequireReallyDeployed(logging.Filter):
|
||||
def filter(self, record):
|
||||
# type: (logging.LogRecord) -> bool
|
||||
from django.conf import settings
|
||||
return settings.PRODUCTION
|
||||
|
||||
Reference in New Issue
Block a user