From 09aa2597888c829378b2eb3d6dfda47abfa93cd2 Mon Sep 17 00:00:00 2001 From: Rob van der Linde Date: Wed, 28 Feb 2024 13:15:40 +1300 Subject: [PATCH] netcmd: models: ClaimType: move all dunder methods to the top for consistency 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 Reviewed-by: Andrew Bartlett Reviewed-by: Douglas Bagnall --- python/samba/netcmd/domain/models/claim_type.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/python/samba/netcmd/domain/models/claim_type.py b/python/samba/netcmd/domain/models/claim_type.py index 7e1c8169870..17ff4336671 100644 --- a/python/samba/netcmd/domain/models/claim_type.py +++ b/python/samba/netcmd/domain/models/claim_type.py @@ -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) -- 2.47.3