wagtail-modeltranslation/wagtail_modeltranslation/utils.py
Alexandre Silva 32d902b049 Code cleanup.
2017-03-03 11:10:27 +00:00

11 lines
256 B
Python

# coding: utf-8
import inspect
def compare_class_tree_depth(a, b):
"""
Function to sort a list of class objects, where subclasses
have lower indices than their superclasses
"""
return len(inspect.getmro(b)) - len(inspect.getmro(a))