mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2024-10-01 11:49:51 -04:00
PEP8
This commit is contained in:
parent
6bc9edd8b2
commit
0bfa78b39b
@ -17,9 +17,7 @@
|
||||
import sys
|
||||
sys.dont_write_bytecode = True
|
||||
|
||||
from synapse.storage import (
|
||||
prepare_database, UpgradeDatabaseException,
|
||||
)
|
||||
from synapse.storage import UpgradeDatabaseException
|
||||
from synapse.storage.engines import create_engine
|
||||
|
||||
from synapse.server import HomeServer
|
||||
@ -60,7 +58,6 @@ import os
|
||||
import re
|
||||
import resource
|
||||
import subprocess
|
||||
import sqlite3
|
||||
import yaml
|
||||
|
||||
|
||||
@ -322,7 +319,7 @@ def change_resource_limit(soft_file_no):
|
||||
resource.setrlimit(resource.RLIMIT_NOFILE, (soft_file_no, hard))
|
||||
|
||||
logger.info("Set file limit to: %d", soft_file_no)
|
||||
except ( ValueError, resource.error) as e:
|
||||
except (ValueError, resource.error) as e:
|
||||
logger.warn("Failed to set file limit: %s", e)
|
||||
|
||||
|
||||
|
@ -13,8 +13,6 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
from twisted.internet import defer
|
||||
|
||||
from .appservice import ApplicationServiceStore
|
||||
from .directory import DirectoryStore
|
||||
from .events import EventsStore
|
||||
@ -43,8 +41,6 @@ import logging
|
||||
import os
|
||||
import re
|
||||
|
||||
import threading
|
||||
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
|
@ -105,7 +105,6 @@ class RegistrationStore(SQLBaseStore):
|
||||
|
||||
defer.returnValue(user_info)
|
||||
|
||||
|
||||
@cached()
|
||||
# TODO(paul): Currently there's no code to invalidate this cache. That
|
||||
# means if/when we ever add internal ways to invalidate access tokens or
|
||||
|
@ -40,7 +40,6 @@ class RoomMemberStore(SQLBaseStore):
|
||||
"""
|
||||
try:
|
||||
target_user_id = event.state_key
|
||||
domain = UserID.from_string(target_user_id).domain
|
||||
except:
|
||||
logger.exception(
|
||||
"Failed to parse target_user_id=%s", target_user_id
|
||||
|
@ -159,4 +159,3 @@ class StateStore(SQLBaseStore):
|
||||
|
||||
def _make_group_id(clock):
|
||||
return str(int(clock.time_msec())) + random_string(5)
|
||||
|
||||
|
@ -375,4 +375,3 @@ class DestinationsTable(object):
|
||||
"retry_last_ts",
|
||||
"retry_interval",
|
||||
]
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user