From 8ad2b279edbee0b6627a72cc99f58728a5b9c534 Mon Sep 17 00:00:00 2001 From: Ivan Habunek Date: Mon, 26 Jun 2023 17:02:58 +0200 Subject: [PATCH] Ignore warning not to compare types No other way around it here. --- toot/entities.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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