This commit is contained in:
codl 2017-09-24 23:54:03 +02:00
parent 1b07bf1020
commit a6870d3775
No known key found for this signature in database
GPG Key ID: 6CD7C8891ED1233A
4 changed files with 4 additions and 6 deletions

View File

@ -110,7 +110,7 @@ class ImgProxyCache(object):
try:
headers = pickle.loads(headers) # nosec
except Exception as e:
except Exception:
self.redis.delete(self.key('headers', url))
headers = None

View File

@ -1,6 +1,4 @@
from json import dumps
from flask import url_for
from app import imgproxy
def account(acc):

View File

@ -331,7 +331,7 @@ def update_mastodon_instances_popularity():
amount = 0.001
if acct.policy_enabled:
amount = 0.01
for session in acct.sessions:
for _ in acct.sessions:
amount += 0.01
instance.bump(amount / instance.popularity)

View File

@ -14,7 +14,7 @@ def app(redisdb):
app_.debug = True
@app_.route('/')
def hello():
def hello(): # pylint: disable=W0612
return 'Hello, world!'
with app_.app_context():
yield app_
@ -95,7 +95,7 @@ def test_brotli_dynamic_timeout(app):
libforget.brotli.brotli(app, timeout=0.001)
@app.route('/hard_to_compress')
def hard_to_compress():
def hard_to_compress(): # pylint: disable=W0612
return token_urlsafe(2**16)
client = app.test_client()