update fixes
This commit is contained in:
parent
3b9826c634
commit
34181d2e09
2 changed files with 4 additions and 1 deletions
|
|
@ -2,6 +2,8 @@ import os
|
|||
|
||||
from ytdl_sub.utils.system import IS_WINDOWS
|
||||
|
||||
# pylint: disable=invalid-name
|
||||
|
||||
|
||||
def _existing_path(*paths: str) -> str:
|
||||
"""
|
||||
|
|
|
|||
|
|
@ -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(
|
||||
|
|
|
|||
Loading…
Reference in a new issue