Merge pull request #7744 from freqtrade/dependabot/pip/develop/mypy-0.990

Bump mypy from 0.982 to 0.990
This commit is contained in:
Matthias 2022-11-15 06:24:24 +01:00 committed by GitHub
commit 6deb2dfb61
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 8 additions and 6 deletions

View File

@ -392,7 +392,7 @@ class Edge:
# Returning a list of pairs in order of "expectancy" # Returning a list of pairs in order of "expectancy"
return final return final
def _find_trades_for_stoploss_range(self, df, pair, stoploss_range): def _find_trades_for_stoploss_range(self, df, pair: str, stoploss_range) -> list:
buy_column = df['enter_long'].values buy_column = df['enter_long'].values
sell_column = df['exit_long'].values sell_column = df['exit_long'].values
date_column = df['date'].values date_column = df['date'].values
@ -407,7 +407,7 @@ class Edge:
return result return result
def _detect_next_stop_or_sell_point(self, buy_column, sell_column, date_column, def _detect_next_stop_or_sell_point(self, buy_column, sell_column, date_column,
ohlc_columns, stoploss, pair): ohlc_columns, stoploss, pair: str):
""" """
Iterate through ohlc_columns in order to find the next trade Iterate through ohlc_columns in order to find the next trade
Next trade opens from the first buy signal noticed to Next trade opens from the first buy signal noticed to

View File

@ -354,7 +354,7 @@ class FreqtradeBot(LoggingMixin):
if self.trading_mode == TradingMode.FUTURES: if self.trading_mode == TradingMode.FUTURES:
self._schedule.run_pending() self._schedule.run_pending()
def update_closed_trades_without_assigned_fees(self): def update_closed_trades_without_assigned_fees(self) -> None:
""" """
Update closed trades without close fees assigned. Update closed trades without close fees assigned.
Only acts when Orders are in the database, otherwise the last order-id is unknown. Only acts when Orders are in the database, otherwise the last order-id is unknown.
@ -379,7 +379,7 @@ class FreqtradeBot(LoggingMixin):
stoploss_order=order.ft_order_side == 'stoploss', stoploss_order=order.ft_order_side == 'stoploss',
send_msg=False) send_msg=False)
trades: List[Trade] = Trade.get_open_trades_without_assigned_fees() trades = Trade.get_open_trades_without_assigned_fees()
for trade in trades: for trade in trades:
if trade.is_open and not trade.fee_updated(trade.entry_side): if trade.is_open and not trade.fee_updated(trade.entry_side):
order = trade.select_order(trade.entry_side, False) order = trade.select_order(trade.entry_side, False)

View File

@ -166,7 +166,7 @@ class Backtesting:
PairLocks.use_db = True PairLocks.use_db = True
Trade.use_db = True Trade.use_db = True
def init_backtest_detail(self): def init_backtest_detail(self) -> None:
# Load detail timeframe if specified # Load detail timeframe if specified
self.timeframe_detail = str(self.config.get('timeframe_detail', '')) self.timeframe_detail = str(self.config.get('timeframe_detail', ''))
if self.timeframe_detail: if self.timeframe_detail:

View File

@ -30,6 +30,8 @@ asyncio_mode = "auto"
[tool.mypy] [tool.mypy]
ignore_missing_imports = true ignore_missing_imports = true
namespace_packages = false
implicit_optional = true
warn_unused_ignores = true warn_unused_ignores = true
exclude = [ exclude = [
'^build_helpers\.py$' '^build_helpers\.py$'

View File

@ -8,7 +8,7 @@
coveralls==3.3.1 coveralls==3.3.1
flake8==5.0.4 flake8==5.0.4
flake8-tidy-imports==4.8.0 flake8-tidy-imports==4.8.0
mypy==0.982 mypy==0.990
pre-commit==2.20.0 pre-commit==2.20.0
pytest==7.2.0 pytest==7.2.0
pytest-asyncio==0.20.2 pytest-asyncio==0.20.2