update fixes

This commit is contained in:
Jesse Bannon 2025-10-16 08:02:35 -07:00
parent 3b9826c634
commit 34181d2e09
2 changed files with 4 additions and 1 deletions

View file

@ -2,6 +2,8 @@ import os
from ytdl_sub.utils.system import IS_WINDOWS
# pylint: disable=invalid-name
def _existing_path(*paths: str) -> str:
"""

View file

@ -2,6 +2,7 @@
import inspect
from dataclasses import dataclass
from inspect import FullArgSpec
from types import NoneType
from typing import Callable
from typing import List
from typing import Optional
@ -50,7 +51,7 @@ def get_optional_type(optional_type: Type) -> Type[NamedType]:
-------
Type within the Optional[Type]
"""
return [arg for arg in optional_type.__args__ if arg != type(None)][0]
return [arg for arg in optional_type.__args__ if not isinstance(arg, NoneType)][0]
def _is_union_compatible(