sourcery_analytics.metrics

Static code quality metrics, computed from astroid nodes.

A Metric is a function over a node that returns a MetricResult, which must be orderable (to compute max values), addable (to compute totals) and dividable (to compute averages). Numbers, therefore, always count, and the results of multiple metrics can be combined into a compound metric result that fulfils these requirements.

This module also defines a MethodMetric, which is a metric specifically for methods (function definitions).

sourcery_analytics.metrics.standard_method_metrics()

Returns a collection of standard metrics to be used on methods.

Submodules