mirror of
https://github.com/OpenBB-finance/OpenBB.git
synced 2026-11-04 16:32:10 +00:00
[Bug fix] - Fix package mypy (#6110)
* fix: package mypy * types * black
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
from pydantic import BaseModel, Field
|
||||
from uuid_extensions import uuid7str
|
||||
from uuid_extensions import uuid7str # type: ignore
|
||||
|
||||
|
||||
class Tagged(BaseModel):
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
import sys
|
||||
from dataclasses import dataclass
|
||||
from typing import Optional
|
||||
from typing import Dict, Optional
|
||||
|
||||
# `slots` is available on Python >= 3.10
|
||||
if sys.version_info >= (3, 10):
|
||||
slots_true = {"slots": True}
|
||||
else:
|
||||
slots_true = {}
|
||||
slots_true: Dict[str, bool] = {}
|
||||
|
||||
|
||||
class BaseMetadata:
|
||||
|
||||
@@ -24,7 +24,7 @@ class Container:
|
||||
return getattr(obbject, "to_" + output_type)()
|
||||
|
||||
def _get_provider(
|
||||
self, choice: Optional[str], cmd: str, available: Tuple[str]
|
||||
self, choice: Optional[str], cmd: str, available: Tuple[str, ...]
|
||||
) -> str:
|
||||
"""Get the provider to use in execution."""
|
||||
if choice is None:
|
||||
|
||||
@@ -7,7 +7,7 @@ from openbb_core.app.utils import check_single_item, convert_to_basemodel
|
||||
|
||||
def filter_inputs(
|
||||
data_processing: bool = False,
|
||||
extra_info: Optional[Dict[str, List[str]]] = None,
|
||||
extra_info: Optional[Dict[str, Dict[str, List[str]]]] = None,
|
||||
**kwargs,
|
||||
) -> dict:
|
||||
"""Filter command inputs."""
|
||||
|
||||
@@ -16,7 +16,9 @@ from openbb_core.provider.utils.descriptions import (
|
||||
class TrailingDivYieldQueryParams(QueryParams):
|
||||
"""Trailing Dividend Yield Query."""
|
||||
|
||||
symbol: str = Field(default=None, description=QUERY_DESCRIPTIONS.get("symbol", ""))
|
||||
symbol: Optional[str] = Field(
|
||||
default=None, description=QUERY_DESCRIPTIONS.get("symbol", "")
|
||||
)
|
||||
limit: Optional[int] = Field(
|
||||
default=252,
|
||||
description=f"{QUERY_DESCRIPTIONS.get('limit', '')}"
|
||||
|
||||
@@ -3443,7 +3443,7 @@ class ROUTER_equity_fundamental(Container):
|
||||
def trailing_dividend_yield(
|
||||
self,
|
||||
symbol: Annotated[
|
||||
str, OpenBBCustomParameter(description="Symbol to get data for.")
|
||||
Optional[str], OpenBBCustomParameter(description="Symbol to get data for.")
|
||||
] = None,
|
||||
limit: Annotated[
|
||||
Optional[int],
|
||||
@@ -3458,7 +3458,7 @@ class ROUTER_equity_fundamental(Container):
|
||||
|
||||
Parameters
|
||||
----------
|
||||
symbol : str
|
||||
symbol : Optional[str]
|
||||
Symbol to get data for.
|
||||
limit : Optional[int]
|
||||
The number of data entries to return. Default is 252, the number of trading days in a year.
|
||||
|
||||
Reference in New Issue
Block a user