Address PR feedback - change output to show Filename only

This commit is contained in:
Matthias 2019-12-28 06:25:45 +01:00
parent ad75048678
commit fc98cf0037
2 changed files with 6 additions and 6 deletions

View File

@ -110,7 +110,7 @@ freqtrade new-hyperopt --userdir ~/.freqtrade/ --hyperopt AwesomeHyperopt
## List Strategies
Use the `list-strategies` subcommand to see all strategies in one particular folder.
Use the `list-strategies` subcommand to see all strategies in one particular directory.
```
freqtrade list-strategies --help
@ -135,12 +135,12 @@ Common arguments:
```
!!! Warning
Using this command will try to load all python files from a folder. This can be a security risk if untrusted files reside in this folder, since all module-level code is executed.
Using this command will try to load all python files from a directory. This can be a security risk if untrusted files reside in this directory, since all module-level code is executed.
Example: search default strategy folder within userdir
Example: search default strategy directory within userdir
``` bash
freqtrade list-strategies --user-data ~/.freqtrade/
freqtrade list-strategies --userdir ~/.freqtrade/
```
Example: search dedicated strategy path

View File

@ -226,7 +226,7 @@ def start_download_data(args: Dict[str, Any]) -> None:
def start_list_strategies(args: Dict[str, Any]) -> None:
"""
Print Strategies available in a folder
Print Strategies available in a directory
"""
config = setup_utils_configuration(args, RunMode.UTIL_NO_EXCHANGE)
@ -234,7 +234,7 @@ def start_list_strategies(args: Dict[str, Any]) -> None:
strategies = StrategyResolver.search_all_objects(directory)
# Sort alphabetically
strategies = sorted(strategies, key=lambda x: x['name'])
strats_to_print = [{'name': s['name'], 'location': s['location']} for s in strategies]
strats_to_print = [{'name': s['name'], 'location': s['location'].name} for s in strategies]
if args['print_one_column']:
print('\n'.join([s['name'] for s in strategies]))