Fix /stocks/options/hist (#2749)

* Fixed incorrect type breaking pre-commit

* Fixed hist not working

Co-authored-by: Colin Delahunty <72827203+colin99d@users.noreply.github.com>
This commit is contained in:
Gerard
2022-10-09 20:21:58 +02:00
committed by GitHub
parent 83377868b2
commit 7d584fb8d5
3 changed files with 6 additions and 6 deletions

View File

@@ -98,14 +98,14 @@ def display_raw(
"volume": True,
"xrotation": theme.xticks_rotation,
"scale_padding": {"left": 0.3, "right": 1, "top": 0.8, "bottom": 0.8},
"upexpiry_width_config": {
"update_width_config": {
"candle_linewidth": 0.6,
"candle_width": 0.8,
"volume_linewidth": 0.8,
"volume_width": 0.8,
},
"warn_too_much_data": 10000,
"expirytime_format": "%Y-%b-%d",
"datetime_format": "%Y-%b-%d",
}
# This plot has 2 axes
option_type = "call" if call else "put"

View File

@@ -676,12 +676,12 @@ class OptionsController(BaseController):
(
ns_parser.put
and ns_parser.strike
in [float(strike) for strike in self.chain.puts["strike"]]
not in [float(strike) for strike in self.chain.puts["strike"]]
)
or (
not ns_parser.put
and ns_parser.strike
in [float(strike) for strike in self.chain.calls["strike"]]
not in [float(strike) for strike in self.chain.calls["strike"]]
)
):
console.print("No correct strike input\n")

View File

@@ -8,7 +8,7 @@ __docformat__ = "numpy"
import logging
import os
from datetime import datetime, timedelta, date
from typing import Any, Union, Optional, Iterable, List
from typing import Any, Union, Optional, Iterable, List, Dict
import financedatabase as fd
import matplotlib.pyplot as plt
@@ -88,7 +88,7 @@ def search(
export : str
Export data
"""
kwargs: dict[str, Any] = {"exclude_exchanges": False}
kwargs: Dict[str, Any] = {"exclude_exchanges": False}
if country:
kwargs["country"] = country
if sector: