mirror of
https://git.anonymousland.org/anonymousland/synapse-product.git
synced 2025-05-18 08:40:25 -04:00
Replace all remaining six usage with native Python 3 equivalents (#7704)
This commit is contained in:
parent
98c4e35e3c
commit
a3f11567d9
73 changed files with 111 additions and 237 deletions
|
@ -13,8 +13,6 @@
|
|||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
from six import binary_type, text_type
|
||||
|
||||
from canonicaljson import json
|
||||
from frozendict import frozendict
|
||||
|
||||
|
@ -26,7 +24,7 @@ def freeze(o):
|
|||
if isinstance(o, frozendict):
|
||||
return o
|
||||
|
||||
if isinstance(o, (binary_type, text_type)):
|
||||
if isinstance(o, (bytes, str)):
|
||||
return o
|
||||
|
||||
try:
|
||||
|
@ -41,7 +39,7 @@ def unfreeze(o):
|
|||
if isinstance(o, (dict, frozendict)):
|
||||
return dict({k: unfreeze(v) for k, v in o.items()})
|
||||
|
||||
if isinstance(o, (binary_type, text_type)):
|
||||
if isinstance(o, (bytes, str)):
|
||||
return o
|
||||
|
||||
try:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue