diff options
author | Amber Brown <hawkowl@atleastfornow.net> | 2018-07-09 16:09:20 +1000 |
---|---|---|
committer | Amber Brown <hawkowl@atleastfornow.net> | 2018-07-09 16:09:20 +1000 |
commit | 49af4020190eae6b0c65897d96cd2be286364d2b (patch) | |
tree | 9a51932bae195f097e30b2b2279d23be5a29ca3c /synapse/events | |
parent | Add an isort configuration (#3463) (diff) | |
download | synapse-49af4020190eae6b0c65897d96cd2be286364d2b.tar.xz |
run isort
Diffstat (limited to 'synapse/events')
-rw-r--r-- | synapse/events/__init__.py | 3 | ||||
-rw-r--r-- | synapse/events/builder.py | 5 | ||||
-rw-r--r-- | synapse/events/snapshot.py | 4 | ||||
-rw-r--r-- | synapse/events/utils.py | 9 | ||||
-rw-r--r-- | synapse/events/validator.py | 8 |
5 files changed, 14 insertions, 15 deletions
diff --git a/synapse/events/__init__.py b/synapse/events/__init__.py index cb08da4984..51f9084b90 100644 --- a/synapse/events/__init__.py +++ b/synapse/events/__init__.py @@ -13,9 +13,8 @@ # See the License for the specific language governing permissions and # limitations under the License. -from synapse.util.frozenutils import freeze from synapse.util.caches import intern_dict - +from synapse.util.frozenutils import freeze # Whether we should use frozen_dict in FrozenEvent. Using frozen_dicts prevents # bugs where we accidentally share e.g. signature dicts. However, converting diff --git a/synapse/events/builder.py b/synapse/events/builder.py index 13fbba68c0..e662eaef10 100644 --- a/synapse/events/builder.py +++ b/synapse/events/builder.py @@ -13,13 +13,12 @@ # See the License for the specific language governing permissions and # limitations under the License. -from . import EventBase, FrozenEvent, _event_dict_property +import copy from synapse.types import EventID - from synapse.util.stringutils import random_string -import copy +from . import EventBase, FrozenEvent, _event_dict_property class EventBuilder(EventBase): diff --git a/synapse/events/snapshot.py b/synapse/events/snapshot.py index 8e684d91b5..bcd9bb5946 100644 --- a/synapse/events/snapshot.py +++ b/synapse/events/snapshot.py @@ -13,10 +13,10 @@ # See the License for the specific language governing permissions and # limitations under the License. -from twisted.internet import defer - from frozendict import frozendict +from twisted.internet import defer + class EventContext(object): """ diff --git a/synapse/events/utils.py b/synapse/events/utils.py index 29ae086786..652941ca0d 100644 --- a/synapse/events/utils.py +++ b/synapse/events/utils.py @@ -13,14 +13,15 @@ # See the License for the specific language governing permissions and # limitations under the License. -from synapse.api.constants import EventTypes -from . import EventBase +import re + +from six import string_types from frozendict import frozendict -import re +from synapse.api.constants import EventTypes -from six import string_types +from . import EventBase # Split strings on "." but not "\." This uses a negative lookbehind assertion for '\' # (?<!stuff) matches if the current position in the string is not preceded diff --git a/synapse/events/validator.py b/synapse/events/validator.py index e0e5bf818c..cf184748a1 100644 --- a/synapse/events/validator.py +++ b/synapse/events/validator.py @@ -13,12 +13,12 @@ # See the License for the specific language governing permissions and # limitations under the License. -from synapse.types import EventID, RoomID, UserID -from synapse.api.errors import SynapseError -from synapse.api.constants import EventTypes, Membership - from six import string_types +from synapse.api.constants import EventTypes, Membership +from synapse.api.errors import SynapseError +from synapse.types import EventID, RoomID, UserID + class EventValidator(object): |