From: Rob van der Linde Date: Wed, 28 Feb 2024 00:15:40 +0000 (+1300) Subject: netcmd: models: ClaimType: move all dunder methods to the top for consistency X-Git-Tag: tdb-1.4.11~1547 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=09aa2597888c829378b2eb3d6dfda47abfa93cd2;p=thirdparty%2Fsamba.git 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 --- 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)