diff --git a/toot/entities.py b/toot/entities.py index d812953..739b962 100644 --- a/toot/entities.py +++ b/toot/entities.py @@ -410,7 +410,7 @@ def _prune_optional(field_type): """For `Optional[]` returns the encapsulated ``.""" if get_origin(field_type) == Union: args = get_args(field_type) - if len(args) == 2 and args[1] == type(None): + if len(args) == 2 and args[1] == type(None): # noqa return args[0] return field_type