| Conditions | 4 |
| Total Lines | 11 |
| Code Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 0 |
| CRAP Score | 20 |
| Changes | 0 | ||
| 1 | # coding: utf-8 |
||
| 26 | def get_aliases(): |
||
| 27 | """Get aliases from config file""" |
||
| 28 | config_file, _ = get_config_and_project_dir(get_config_from_argv(argv[1:])) |
||
| 29 | config = {} |
||
| 30 | try: |
||
| 31 | with open(config_file, 'r') as stream: |
||
| 32 | config = load(stream) |
||
| 33 | except (error.YAMLError, FileNotFoundError): |
||
| 34 | pass |
||
| 35 | |||
| 36 | return config['aliases'] if 'aliases' in config else {} |
||
| 37 |