mirror of
https://github.com/OpenBB-finance/OpenBB.git
synced 2026-10-31 06:22:18 +00:00
Fixes linting for the logging service (#5992)
* lints * typing.Type instead
This commit is contained in:
@@ -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,
|
||||
):
|
||||
"""
|
||||
|
||||
Reference in New Issue
Block a user