Fixes linting for the logging service (#5992)

* lints

* typing.Type instead
This commit is contained in:
Henrique Joaquim
2024-01-24 11:21:36 +00:00
committed by GitHub
parent 5a62a097aa
commit e2f3dd007b

View File

@@ -1,8 +1,9 @@
"""Logging Service Module."""
import json
import logging
from enum import Enum
from types import TracebackType
from typing import Any, Callable, Dict, Optional, Tuple, Type, cast
from typing import Any, Callable, Dict, Optional, Tuple, Type, Union, cast
from openbb_core.app.logs.formatters.formatter_with_exceptions import (
FormatterWithExceptions,
@@ -58,7 +59,8 @@ class LoggingService(metaclass=SingletonMeta):
user_settings: UserSettings,
) -> None:
"""
Logging Manager Constructor
Logging Service Constructor.
Sets up the logging settings and handlers and then logs the startup information.
Parameters
@@ -140,9 +142,7 @@ class LoggingService(metaclass=SingletonMeta):
route: Optional[str] = None,
custom_headers: Optional[Dict[str, Any]] = None,
) -> None:
"""
Log startup information.
"""
"""Log startup information."""
def check_credentials_defined(credentials: Dict[str, Any]):
class CredentialsDefinition(Enum):
@@ -182,9 +182,10 @@ class LoggingService(metaclass=SingletonMeta):
route: str,
func: Callable,
kwargs: Dict[str, Any],
exec_info: Optional[
Tuple[Type[BaseException], BaseException, Optional[TracebackType]]
] = None,
exec_info: Union[
Tuple[Type[BaseException], BaseException, TracebackType],
Tuple[None, None, None],
],
custom_headers: Optional[Dict[str, Any]] = None,
):
"""