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.

class sourcery_analytics.cli.choices.AggregationChoice(value)

Bases: Enum

Aggregations available to the CLI.

TOTAL = 'total'
AVERAGE = 'average'
PEAK = 'peak'
as_aggregation() Aggregation

Returns the string choice as a callable method.

class sourcery_analytics.cli.choices.OutputChoice(value)

Bases: Enum

Outputs available in the CLI.

PLAIN = 'plain'
RICH = 'rich'
CSV = 'csv'