Ignore warning not to compare types

No other way around it here.
entities2
Ivan Habunek 2023-06-26 17:02:58 +02:00
rodzic b2c2f7466e
commit 8ad2b279ed
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: CDBD63C43A30BB95
1 zmienionych plików z 1 dodań i 1 usunięć

Wyświetl plik

@ -410,7 +410,7 @@ def _prune_optional(field_type):
"""For `Optional[<type>]` returns the encapsulated `<type>`."""
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