From da107a1af16f8b1dbfc2110b37270d1187d33327 Mon Sep 17 00:00:00 2001 From: Piotr Maslanka <piotr.maslanka@henrietta.com.pl> Date: Sun, 8 Oct 2017 10:36:02 +0200 Subject: [PATCH] def order --- coolamqp/framing/compilation/xml_tags.py | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/coolamqp/framing/compilation/xml_tags.py b/coolamqp/framing/compilation/xml_tags.py index 6397e94..698929f 100644 --- a/coolamqp/framing/compilation/xml_tags.py +++ b/coolamqp/framing/compilation/xml_tags.py @@ -56,17 +56,6 @@ class Field(BaseObject): _docs ] -class Class(BaseObject): - NAME = 'class' - FIELDS = [ - _name, - _SimpleField('index', int), - _docs_with_label, - _ChildField('methods', 'method', Method, postexec=lambda q: sorted(q, - key=lambda m: (m.name.strip('-')[0], -len(m.response)))), - _ChildField('properties', 'field', Field) - ] - class Domain(BaseObject): NAME = 'domain' @@ -115,3 +104,15 @@ class Method(BaseObject): if field.basic_type in DYNAMIC_BASIC_TYPES: return False return True + +class Class(BaseObject): + NAME = 'class' + FIELDS = [ + _name, + _SimpleField('index', int), + _docs_with_label, + _ChildField('methods', 'method', Method, postexec=lambda q: sorted(q, + key=lambda m: (m.name.strip('-')[0], -len(m.response)))), + _ChildField('properties', 'field', Field) + ] + -- GitLab