mirror of
https://github.com/Hopiu/wagtail-modeltranslation.git
synced 2026-05-22 14:01:58 +00:00
11 lines
256 B
Python
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))
|