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

@ -16,8 +16,6 @@ import collections
import re
from typing import Any, Mapping, Union
from six import string_types
from frozendict import frozendict
from twisted.internet import defer
@ -318,7 +316,7 @@ def serialize_event(
if only_event_fields:
if not isinstance(only_event_fields, list) or not all(
isinstance(f, string_types) for f in only_event_fields
isinstance(f, str) for f in only_event_fields
):
raise TypeError("only_event_fields must be a list of strings")
d = only_fields(d, only_event_fields)