sourcery_analytics.cli.choices¶
Choices, implemented as Enums, associated with the CLI.
- class sourcery_analytics.cli.choices.MethodMetricChoice(value)¶
Bases:
Enum
Method metrics available to the CLI.
- COGNITIVE_COMPLEXITY = 'cognitive_complexity'¶
- CYCLOMATIC_COMPLEXITY = 'cyclomatic_complexity'¶
- LENGTH = 'length'¶
- WORKING_MEMORY = 'working_memory'¶
- property method_method_name¶
Returns the method metric’s actual function name, used for sorting.
- as_method_metric() Callable[[FunctionDef], MetricResult] ¶
Returns the string choice as a callable method.