Fix pyflakes errors

pull/4/merge
Mark Haines 10 years ago
parent bcf8eb687a
commit ac21dfff6d
  1. 3
      synapse/api/auth.py
  2. 3
      synapse/api/streams/event.py
  3. 2
      synapse/handlers/federation.py
  4. 2
      synapse/handlers/presence.py
  5. 6
      synapse/handlers/room.py
  6. 2
      synapse/rest/room.py
  7. 5
      synapse/storage/__init__.py
  8. 6
      synapse/storage/feedback.py
  9. 2
      synapse/storage/room.py
  10. 9
      synapse/storage/roommember.py
  11. 2
      synapse/storage/stream.py

@ -19,8 +19,7 @@ from twisted.internet import defer
from synapse.api.constants import Membership
from synapse.api.errors import AuthError, StoreError, Codes
from synapse.api.events.room import (RoomTopicEvent, RoomMemberEvent,
MessageEvent, FeedbackEvent)
from synapse.api.events.room import RoomMemberEvent
import logging

@ -19,9 +19,6 @@ from twisted.internet import defer
from synapse.api.errors import EventStreamError
from synapse.api.events import SynapseEvent
from synapse.api.events.room import (
RoomMemberEvent, MessageEvent, FeedbackEvent, RoomTopicEvent
)
from synapse.api.streams import PaginationStream, StreamData
import logging

@ -175,7 +175,7 @@ class FederationHandler(BaseHandler):
try:
yield self.store.store_room(
event.room_id,
room_id,
"",
is_public=False
)

@ -674,7 +674,7 @@ class PresenceHandler(BaseHandler):
def push_update_to_clients(self, observer_user, observed_user,
statuscache):
state = statuscache.make_event(user=observed_user, clock=self.clock)
statuscache.make_event(user=observed_user, clock=self.clock)
self.notifier.on_new_user_event(
observer_user.to_string(),

@ -20,8 +20,7 @@ from synapse.types import UserID, RoomAlias, RoomID
from synapse.api.constants import Membership
from synapse.api.errors import RoomError, StoreError, SynapseError
from synapse.api.events.room import (
RoomTopicEvent, MessageEvent, InviteJoinEvent, RoomMemberEvent,
RoomConfigEvent
RoomTopicEvent, RoomMemberEvent, RoomConfigEvent
)
from synapse.api.streams.event import EventStream, EventsStreamData
from synapse.handlers.presence import PresenceStreamData
@ -29,7 +28,6 @@ from synapse.util import stringutils
from ._base import BaseHandler
import logging
import json
logger = logging.getLogger(__name__)
@ -303,8 +301,6 @@ class MessageHandler(BaseHandler):
except:
logger.exception("Failed to get snapshot")
user = self.hs.parse_userid(user_id)
ret = {"rooms": rooms_ret, "presence": presence[0], "end": now_token}
# logger.debug("snapshot_all_rooms returning: %s", ret)

@ -249,7 +249,7 @@ class FeedbackRestServlet(RestServlet):
@defer.inlineCallbacks
def on_GET(self, request, room_id, msg_sender_id, msg_id, fb_sender_id,
feedback_type):
user = yield (self.auth.get_user_by_req(request))
yield (self.auth.get_user_by_req(request))
# TODO (erikj): Implement this?
raise NotImplementedError("Getting feedback is not supported")

@ -16,8 +16,9 @@
from twisted.internet import defer
from synapse.api.events.room import (
RoomMemberEvent, MessageEvent, RoomTopicEvent, FeedbackEvent,
RoomConfigEvent, RoomNameEvent,
RoomMemberEvent, RoomTopicEvent, FeedbackEvent,
# RoomConfigEvent,
RoomNameEvent,
)
from synapse.util.logutils import log_function

@ -15,11 +15,7 @@
from twisted.internet import defer
from ._base import SQLBaseStore, Table
from synapse.api.events.room import FeedbackEvent
import collections
import json
from ._base import SQLBaseStore
class FeedbackStore(SQLBaseStore):

@ -18,12 +18,10 @@ from twisted.internet import defer
from sqlite3 import IntegrityError
from synapse.api.errors import StoreError
from synapse.api.events.room import RoomTopicEvent
from ._base import SQLBaseStore, Table
import collections
import json
import logging
logger = logging.getLogger(__name__)

@ -15,15 +15,10 @@
from twisted.internet import defer
from synapse.types import UserID
from synapse.api.constants import Membership
from synapse.api.events.room import RoomMemberEvent
from ._base import SQLBaseStore, Table
from ._base import SQLBaseStore
from synapse.api.constants import Membership
import collections
import json
import logging
logger = logging.getLogger(__name__)

@ -37,10 +37,8 @@ from twisted.internet import defer
from ._base import SQLBaseStore
from synapse.api.errors import SynapseError
from synapse.api.constants import Membership
from synapse.util.logutils import log_function
import json
import logging

Loading…
Cancel
Save