| Conditions | 4 |
| Total Lines | 11 |
| Code Lines | 10 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 10 |
| CRAP Score | 4 |
| Changes | 0 | ||
| 1 | # coding: utf-8 |
||
| 27 | 1 | def find_project_dir(): |
|
| 28 | 1 | path = getcwd() |
|
| 29 | 1 | while True: |
|
| 30 | 1 | files = listdir(path) |
|
| 31 | 1 | if 'stakkr.yml' in files: |
|
| 32 | 1 | return path |
|
| 33 | |||
| 34 | 1 | new_path = dirname(path) |
|
| 35 | 1 | if new_path == path: |
|
| 36 | 1 | raise FileNotFoundError('Could not find config file (stakkr.yml)') |
|
| 37 | path = new_path |
||
| 38 |