From a46f60bd949a83d3f1a8600466785c1c50e0b8fd Mon Sep 17 00:00:00 2001 From: aayush-jain18 Date: Fri, 25 Jun 2021 19:15:49 +0530 Subject: [PATCH] spell corrections --- freqtrade/commands/build_config_commands.py | 4 ++-- freqtrade/configuration/configuration.py | 2 +- freqtrade/constants.py | 2 +- freqtrade/data/converter.py | 2 +- freqtrade/edge/edge_positioning.py | 2 +- freqtrade/exceptions.py | 4 ++-- freqtrade/exchange/exchange.py | 2 +- freqtrade/exchange/kraken.py | 2 +- freqtrade/freqtradebot.py | 2 +- freqtrade/optimize/backtesting.py | 2 +- freqtrade/optimize/optimize_reports.py | 6 +++--- freqtrade/plot/plotting.py | 4 ++-- freqtrade/plugins/pairlist/PerformanceFilter.py | 2 +- freqtrade/resolvers/iresolver.py | 2 +- freqtrade/rpc/fiat_convert.py | 6 +++--- freqtrade/rpc/rpc.py | 6 +++--- freqtrade/rpc/telegram.py | 4 ++-- freqtrade/strategy/hyper.py | 6 +++--- freqtrade/strategy/interface.py | 4 ++-- freqtrade/worker.py | 2 +- 20 files changed, 33 insertions(+), 33 deletions(-) diff --git a/freqtrade/commands/build_config_commands.py b/freqtrade/commands/build_config_commands.py index 03d095e12..b3f912433 100644 --- a/freqtrade/commands/build_config_commands.py +++ b/freqtrade/commands/build_config_commands.py @@ -183,7 +183,7 @@ def deploy_new_config(config_path: Path, selections: Dict[str, Any]) -> None: """ Applies selections to the template and writes the result to config_path :param config_path: Path object for new config file. Should not exist yet - :param selecions: Dict containing selections taken by the user. + :param selections: Dict containing selections taken by the user. """ from jinja2.exceptions import TemplateNotFound try: @@ -213,7 +213,7 @@ def deploy_new_config(config_path: Path, selections: Dict[str, Any]) -> None: def start_new_config(args: Dict[str, Any]) -> None: """ Create a new strategy from a template - Asking the user questions to fill out the templateaccordingly. + Asking the user questions to fill out the template accordingly. """ config_path = Path(args['config'][0]) diff --git a/freqtrade/configuration/configuration.py b/freqtrade/configuration/configuration.py index bfeb2da5c..d2cc68c44 100644 --- a/freqtrade/configuration/configuration.py +++ b/freqtrade/configuration/configuration.py @@ -460,7 +460,7 @@ class Configuration: pairs_file = Path(self.args["pairs_file"]) logger.info(f'Reading pairs file "{pairs_file}".') # Download pairs from the pairs file if no config is specified - # or if pairs file is specified explicitely + # or if pairs file is specified explicitly if not pairs_file.exists(): raise OperationalException(f'No pairs file found with path "{pairs_file}".') config['pairs'] = load_file(pairs_file) diff --git a/freqtrade/constants.py b/freqtrade/constants.py index 013e9df41..6ee4047d2 100644 --- a/freqtrade/constants.py +++ b/freqtrade/constants.py @@ -62,7 +62,7 @@ DUST_PER_COIN = { } -# Soure files with destination directories within user-directory +# Source files with destination directories within user-directory USER_DATA_FILES = { 'sample_strategy.py': USERPATH_STRATEGIES, 'sample_hyperopt_advanced.py': USERPATH_HYPEROPTS, diff --git a/freqtrade/data/converter.py b/freqtrade/data/converter.py index ffee0c52c..040f58d62 100644 --- a/freqtrade/data/converter.py +++ b/freqtrade/data/converter.py @@ -49,7 +49,7 @@ def clean_ohlcv_dataframe(data: DataFrame, timeframe: str, pair: str, *, fill_missing: bool = True, drop_incomplete: bool = True) -> DataFrame: """ - Clense a OHLCV dataframe by + Cleanse a OHLCV dataframe by * Grouping it by date (removes duplicate tics) * dropping last candles if requested * Filling up missing data (if requested) diff --git a/freqtrade/edge/edge_positioning.py b/freqtrade/edge/edge_positioning.py index 9466a1649..977b7e4ec 100644 --- a/freqtrade/edge/edge_positioning.py +++ b/freqtrade/edge/edge_positioning.py @@ -301,7 +301,7 @@ class Edge: def _process_expectancy(self, results: DataFrame) -> Dict[str, Any]: """ This calculates WinRate, Required Risk Reward, Risk Reward and Expectancy of all pairs - The calulation will be done per pair and per strategy. + The calculation will be done per pair and per strategy. """ # Removing pairs having less than min_trades_number min_trades_number = self.edge_config.get('min_trade_number', 10) diff --git a/freqtrade/exceptions.py b/freqtrade/exceptions.py index caf970606..056be8720 100644 --- a/freqtrade/exceptions.py +++ b/freqtrade/exceptions.py @@ -47,7 +47,7 @@ class InvalidOrderException(ExchangeError): class RetryableOrderError(InvalidOrderException): """ This is returned when the order is not found. - This Error will be repeated with increasing backof (in line with DDosError). + This Error will be repeated with increasing backoff (in line with DDosError). """ @@ -75,6 +75,6 @@ class DDosProtection(TemporaryError): class StrategyError(FreqtradeException): """ - Errors with custom user-code deteced. + Errors with custom user-code detected. Usually caused by errors in the strategy. """ diff --git a/freqtrade/exchange/exchange.py b/freqtrade/exchange/exchange.py index 07ac337fc..751dcf11f 100644 --- a/freqtrade/exchange/exchange.py +++ b/freqtrade/exchange/exchange.py @@ -235,7 +235,7 @@ class Exchange: def ohlcv_candle_limit(self, timeframe: str) -> int: """ Exchange ohlcv candle limit - Uses ohlcv_candle_limit_per_timeframe if the exchange has different limts + Uses ohlcv_candle_limit_per_timeframe if the exchange has different limits per timeframe (e.g. bittrex), otherwise falls back to ohlcv_candle_limit :param timeframe: Timeframe to check :return: Candle limit as integer diff --git a/freqtrade/exchange/kraken.py b/freqtrade/exchange/kraken.py index 8f7cbe590..1b069aa6c 100644 --- a/freqtrade/exchange/kraken.py +++ b/freqtrade/exchange/kraken.py @@ -49,7 +49,7 @@ class Kraken(Exchange): orders = self._api.fetch_open_orders() order_list = [(x["symbol"].split("/")[0 if x["side"] == "sell" else 1], x["remaining"] if x["side"] == "sell" else x["remaining"] * x["price"], - # Don't remove the below comment, this can be important for debuggung + # Don't remove the below comment, this can be important for debugging # x["side"], x["amount"], ) for x in orders] for bal in balances: diff --git a/freqtrade/freqtradebot.py b/freqtrade/freqtradebot.py index e8a321e94..ec07d4d63 100644 --- a/freqtrade/freqtradebot.py +++ b/freqtrade/freqtradebot.py @@ -98,7 +98,7 @@ class FreqtradeBot(LoggingMixin): initial_state = self.config.get('initial_state') self.state = State[initial_state.upper()] if initial_state else State.STOPPED - # Protect sell-logic from forcesell and viceversa + # Protect sell-logic from forcesell and vice versa self._sell_lock = Lock() LoggingMixin.__init__(self, logger, timeframe_to_seconds(self.strategy.timeframe)) diff --git a/freqtrade/optimize/backtesting.py b/freqtrade/optimize/backtesting.py index 8b75fe438..e2ca39530 100644 --- a/freqtrade/optimize/backtesting.py +++ b/freqtrade/optimize/backtesting.py @@ -445,7 +445,7 @@ class Backtesting: for trade in open_trades[pair]: # also check the buying candle for sell conditions. trade_entry = self._get_sell_trade_entry(trade, row) - # Sell occured + # Sell occurred if trade_entry: # logger.debug(f"{pair} - Backtesting sell {trade}") open_trade_count -= 1 diff --git a/freqtrade/optimize/optimize_reports.py b/freqtrade/optimize/optimize_reports.py index df7f721ec..20f099697 100644 --- a/freqtrade/optimize/optimize_reports.py +++ b/freqtrade/optimize/optimize_reports.py @@ -21,7 +21,7 @@ def store_backtest_stats(recordfilename: Path, stats: Dict[str, DataFrame]) -> N Stores backtest results :param recordfilename: Path object, which can either be a filename or a directory. Filenames will be appended with a timestamp right before the suffix - while for diectories, /backtest-result-.json will be used as filename + while for directories, /backtest-result-.json will be used as filename :param stats: Dataframe containing the backtesting statistics """ if recordfilename.is_dir(): @@ -300,7 +300,7 @@ def generate_strategy_stats(btdata: Dict[str, DataFrame], :param min_date: Backtest start date :param max_date: Backtest end date :param market_change: float indicating the market change - :return: Dictionary containing results per strategy and a stratgy summary. + :return: Dictionary containing results per strategy and a strategy summary. """ results: Dict[str, DataFrame] = content['results'] if not isinstance(results, DataFrame): @@ -436,7 +436,7 @@ def generate_backtest_stats(btdata: Dict[str, DataFrame], { Strategy: {'results: results, 'config: config}}. :param min_date: Backtest start date :param max_date: Backtest end date - :return: Dictionary containing results per strategy and a stratgy summary. + :return: Dictionary containing results per strategy and a strategy summary. """ result: Dict[str, Any] = {'strategy': {}} market_change = calculate_market_change(btdata, 'close') diff --git a/freqtrade/plot/plotting.py b/freqtrade/plot/plotting.py index c1b1232c2..4119b7f71 100644 --- a/freqtrade/plot/plotting.py +++ b/freqtrade/plot/plotting.py @@ -288,8 +288,8 @@ def plot_area(fig, row: int, data: pd.DataFrame, indicator_a: str, :param fig: Plot figure to append to :param row: row number for this plot :param data: candlestick DataFrame - :param indicator_a: indicator name as populated in stragetie - :param indicator_b: indicator name as populated in stragetie + :param indicator_a: indicator name as populated in strategy + :param indicator_b: indicator name as populated in strategy :param label: label for the filled area :param fill_color: color to be used for the filled area :return: fig with added filled_traces plot diff --git a/freqtrade/plugins/pairlist/PerformanceFilter.py b/freqtrade/plugins/pairlist/PerformanceFilter.py index bf474cb21..46a289ae6 100644 --- a/freqtrade/plugins/pairlist/PerformanceFilter.py +++ b/freqtrade/plugins/pairlist/PerformanceFilter.py @@ -19,7 +19,7 @@ class PerformanceFilter(IPairList): def needstickers(self) -> bool: """ Boolean property defining if tickers are necessary. - If no Pairlist requries tickers, an empty List is passed + If no Pairlist requires tickers, an empty List is passed as tickers argument to filter_pairlist """ return False diff --git a/freqtrade/resolvers/iresolver.py b/freqtrade/resolvers/iresolver.py index 5b6977b4b..eaba7d201 100644 --- a/freqtrade/resolvers/iresolver.py +++ b/freqtrade/resolvers/iresolver.py @@ -163,7 +163,7 @@ class IResolver: :param directory: Path to search :param enum_failed: If True, will return None for modules which fail. Otherwise, failing modules are skipped. - :return: List of dicts containing 'name', 'class' and 'location' entires + :return: List of dicts containing 'name', 'class' and 'location' entries """ logger.debug(f"Searching for {cls.object_type.__name__} '{directory}'") objects = [] diff --git a/freqtrade/rpc/fiat_convert.py b/freqtrade/rpc/fiat_convert.py index 5ae20afa1..199e6a7db 100644 --- a/freqtrade/rpc/fiat_convert.py +++ b/freqtrade/rpc/fiat_convert.py @@ -102,7 +102,7 @@ class CryptoToFiatConverter: inverse = True symbol = f"{crypto_symbol}/{fiat_symbol}" - # Check if the fiat convertion you want is supported + # Check if the fiat conversion you want is supported if not self._is_supported_fiat(fiat=fiat_symbol): raise ValueError(f'The fiat {fiat_symbol} is not supported.') @@ -135,7 +135,7 @@ class CryptoToFiatConverter: :param fiat_symbol: FIAT currency you want to convert to (e.g usd) :return: float, price of the crypto-currency in Fiat """ - # Check if the fiat convertion you want is supported + # Check if the fiat conversion you want is supported if not self._is_supported_fiat(fiat=fiat_symbol): raise ValueError(f'The fiat {fiat_symbol} is not supported.') @@ -146,7 +146,7 @@ class CryptoToFiatConverter: if self._cryptomap == {}: if self._backoff <= datetime.datetime.now().timestamp(): self._load_cryptomap() - # return 0.0 if we still dont have data to check, no reason to proceed + # return 0.0 if we still don't have data to check, no reason to proceed if self._cryptomap == {}: return 0.0 else: diff --git a/freqtrade/rpc/rpc.py b/freqtrade/rpc/rpc.py index 8f806f555..add66d576 100644 --- a/freqtrade/rpc/rpc.py +++ b/freqtrade/rpc/rpc.py @@ -180,9 +180,9 @@ class RPC: base_currency=self._freqtrade.config['stake_currency'], close_profit=trade.close_profit if trade.close_profit is not None else None, current_rate=current_rate, - current_profit=current_profit, # Deprectated - current_profit_pct=round(current_profit * 100, 2), # Deprectated - current_profit_abs=current_profit_abs, # Deprectated + current_profit=current_profit, # Deprecated + current_profit_pct=round(current_profit * 100, 2), # Deprecated + current_profit_abs=current_profit_abs, # Deprecated profit_ratio=current_profit, profit_pct=round(current_profit * 100, 2), profit_abs=current_profit_abs, diff --git a/freqtrade/rpc/telegram.py b/freqtrade/rpc/telegram.py index 16c9fddcc..d857e46a9 100644 --- a/freqtrade/rpc/telegram.py +++ b/freqtrade/rpc/telegram.py @@ -103,7 +103,7 @@ class Telegram(RPCHandler): # do not allow commands with mandatory arguments and critical cmds # like /forcesell and /forcebuy # TODO: DRY! - its not good to list all valid cmds here. But otherwise - # this needs refacoring of the whole telegram module (same + # this needs refactoring of the whole telegram module (same # problem in _help()). valid_keys: List[str] = [r'/start$', r'/stop$', r'/status$', r'/status table$', r'/trades$', r'/performance$', r'/daily$', r'/daily \d+$', @@ -611,7 +611,7 @@ class Telegram(RPCHandler): curr_output = (f"*{curr['currency']}:* not showing <{balance_dust_level} " f"{curr['stake']} amount \n") - # Handle overflowing messsage length + # Handle overflowing message length if len(output + curr_output) >= MAX_TELEGRAM_MESSAGE_LENGTH: self._send_msg(output) output = curr_output diff --git a/freqtrade/strategy/hyper.py b/freqtrade/strategy/hyper.py index e487ffeff..21a806202 100644 --- a/freqtrade/strategy/hyper.py +++ b/freqtrade/strategy/hyper.py @@ -242,7 +242,7 @@ class CategoricalParameter(BaseParameter): class HyperStrategyMixin(object): """ - A helper base class which allows HyperOptAuto class to reuse implementations of of buy/sell + A helper base class which allows HyperOptAuto class to reuse implementations of buy/sell strategy logic. """ @@ -258,7 +258,7 @@ class HyperStrategyMixin(object): def enumerate_parameters(self, category: str = None) -> Iterator[Tuple[str, BaseParameter]]: """ - Find all optimizeable parameters and return (name, attr) iterator. + Find all optimizable parameters and return (name, attr) iterator. :param category: :return: """ @@ -310,7 +310,7 @@ class HyperStrategyMixin(object): def _load_params(self, params: dict, space: str, hyperopt: bool = False) -> None: """ - Set optimizeable parameter values. + Set optimizable parameter values. :param params: Dictionary with new parameter values. """ if not params: diff --git a/freqtrade/strategy/interface.py b/freqtrade/strategy/interface.py index 65e27a2c2..c29111de9 100644 --- a/freqtrade/strategy/interface.py +++ b/freqtrade/strategy/interface.py @@ -270,7 +270,7 @@ class IStrategy(ABC, HyperStrategyMixin): :param current_rate: Rate, calculated based on pricing settings in ask_strategy. :param current_profit: Current profit (as ratio), calculated based on current_rate. :param **kwargs: Ensure to keep this here so updates to this won't break your strategy. - :return float: New stoploss value, relative to the currentrate + :return float: New stoploss value, relative to the current_rate """ return self.stoploss @@ -301,7 +301,7 @@ class IStrategy(ABC, HyperStrategyMixin): def informative_pairs(self) -> ListPairsWithTimeframes: """ Define additional, informative pair/interval combinations to be cached from the exchange. - These pair/interval combinations are non-tradeable, unless they are part + These pair/interval combinations are non-tradable, unless they are part of the whitelist as well. For more information, please consult the documentation :return: List of tuples in the format (pair, interval) diff --git a/freqtrade/worker.py b/freqtrade/worker.py index 4fa9166bf..5c0de86ff 100755 --- a/freqtrade/worker.py +++ b/freqtrade/worker.py @@ -61,7 +61,7 @@ class Worker: def _notify(self, message: str) -> None: """ - Removes the need to verify in all occurances if sd_notify is enabled + Removes the need to verify in all occurrences if sd_notify is enabled :param message: Message to send to systemd if it's enabled. """ if self._sd_notify: