oct
Loading...
Searching...
No Matches
thresholds.py File Reference

Go to the source code of this file.

Classes

class  oct.complexity.thresholds.GateRefusalError
class  oct.complexity.thresholds.Thresholds
class  oct.complexity.thresholds.Breach
class  oct.complexity.thresholds.Verdict

Namespaces

namespace  oct
namespace  oct.complexity
namespace  oct.complexity.thresholds

Functions

Thresholds oct.complexity.thresholds.resolve_thresholds (int|None flag_max_cc, float|None flag_max_crap, dict|None config)
str|None oct.complexity.thresholds._source (object flag_value, object config_value)
int|float|None oct.complexity.thresholds._coerce_limit (object value, str key, bool as_int)
tuple[Breach,...] oct.complexity.thresholds.evaluate (Sequence[FunctionResult] results, Thresholds thresholds, str|Path root, Mapping[str, "BaselineEntry"]|None baseline=None)
tuple[str,...] oct.complexity.thresholds._worsened_metrics (FunctionResult item, tuple[str,...] metrics, "BaselineEntry" recorded)
str oct.complexity.thresholds._reason (Mapping[str, "BaselineEntry"]|None baseline, "BaselineEntry | None" recorded, tuple[str,...] metrics)
tuple[str,...] oct.complexity.thresholds._breached_metrics (FunctionResult item, Thresholds thresholds)
Verdict oct.complexity.thresholds.build_verdict (Thresholds thresholds, Sequence[Breach] breaches, str|None baseline=None, int|None baseline_functions=None, str|None baseline_written=None, int|None baseline_written_functions=None)
str oct.complexity.thresholds.render_verdict (Verdict verdict)
list[str] oct.complexity.thresholds._render_outcome (Verdict verdict)
str oct.complexity.thresholds._number (float value)

Variables

int oct.complexity.thresholds.ADVISORY_MAX_CC = 15
int oct.complexity.thresholds.ADVISORY_MAX_CRAP = 30
int oct.complexity.thresholds.EXIT_CLEAN = 0
int oct.complexity.thresholds.EXIT_BREACH = 2
int oct.complexity.thresholds.EXIT_REFUSAL = 3
str oct.complexity.thresholds.SOURCE_FLAG = "flag"
str oct.complexity.thresholds.SOURCE_CONFIG = "octrc"
str oct.complexity.thresholds.CONFIG_SECTION = "complexity"