MCPcopy Create free account
hub / github.com/SourceCode-AI/aura / get_score_or_default

Function get_score_or_default

aura/config.py:129–138  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

127
128@lru_cache()
129def 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
141def find_configuration() -> Path: # TODO: add tests

Callers 6

check_unpinnedFunction · 0.85
check_outdatedFunction · 0.85
scanFunction · 0.85
analyzer_poetry_lockFunction · 0.85
analyze_wheelFunction · 0.85

Calls 1

getMethod · 0.80

Tested by

no test coverage detected