Retrieve score as defined in the config or fallback to the default provided value The scoring values are cached using lru_cache to avoid unnecessary lookups :param score_type: name of the scoring parameter as defined in the [score] aura config section :param fallback: fallback defa
(score_type: str, fallback: int)
| 127 | |
| 128 | @lru_cache() |
| 129 | def get_score_or_default(score_type: str, fallback: int) -> int: |
| 130 | """ |
| 131 | Retrieve score as defined in the config or fallback to the default provided value |
| 132 | The scoring values are cached using lru_cache to avoid unnecessary lookups |
| 133 | |
| 134 | :param score_type: name of the scoring parameter as defined in the [score] aura config section |
| 135 | :param fallback: fallback default value |
| 136 | :return: Score integer |
| 137 | """ |
| 138 | return CFG["score"].get(score_type, fallback) |
| 139 | |
| 140 | |
| 141 | def find_configuration() -> Path: # TODO: add tests |
no test coverage detected