netcmd: models: ClaimType: move all dunder methods to the top for consistency
authorRob van der Linde <rob@catalyst.net.nz>
Wed, 28 Feb 2024 00:15:40 +0000 (13:15 +1300)
committerAndrew Bartlett <abartlet@samba.org>
Fri, 1 Mar 2024 04:45:36 +0000 (04:45 +0000)
It's nice to consistently list the __str__ method first and all the dunder methods, then the static methods, then the rest.

At least for the models.

Signed-off-by: Rob van der Linde <rob@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
python/samba/netcmd/domain/models/claim_type.py

index 7e1c81698707368b01711f898692145dd820fef7..17ff4336671718b8782ff3aa71f92eb7e36b9adf 100644 (file)
@@ -39,6 +39,9 @@ class ClaimType(Model):
         "msDS-ClaimTypeAppliesToClass", many=True)
     claim_value_type = IntegerField("msDS-ClaimValueType")
 
+    def __str__(self):
+        return str(self.display_name)
+
     @staticmethod
     def get_base_dn(ldb):
         """Return the base DN for the ClaimType model.
@@ -53,6 +56,3 @@ class ClaimType(Model):
     @staticmethod
     def get_object_class():
         return "msDS-ClaimType"
-
-    def __str__(self):
-        return str(self.display_name)