Replace all remaining six usage with native Python 3 equivalents (#7704)

This commit is contained in:
Dagfinn Ilmari Mannsåker 2020-06-16 13:51:47 +01:00 committed by GitHub
parent 98c4e35e3c
commit a3f11567d9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
73 changed files with 111 additions and 237 deletions

View file

@ -17,8 +17,6 @@
import logging
from typing import Optional, Tuple
from six import string_types
from canonicaljson import encode_canonical_json, json
from twisted.internet import defer
@ -715,7 +713,7 @@ class EventCreationHandler(object):
spam_error = self.spam_checker.check_event_for_spam(event)
if spam_error:
if not isinstance(spam_error, string_types):
if not isinstance(spam_error, str):
spam_error = "Spam is not permitted here"
raise SynapseError(403, spam_error, Codes.FORBIDDEN)