summaryrefslogtreecommitdiff
path: root/python
diff options
context:
space:
mode:
authorRob van der Linde <rob@catalyst.net.nz>2024-02-28 13:15:40 +1300
committerAndrew Bartlett <abartlet@samba.org>2024-03-01 04:45:36 +0000
commit09aa2597888c829378b2eb3d6dfda47abfa93cd2 (patch)
tree19569f7913c811b35fe65d831785c848574029eb /python
parent2d7cbba23ef4ea6640553e3175243a82db390f8a (diff)
downloadsamba-09aa2597888c829378b2eb3d6dfda47abfa93cd2.tar.gz
samba-09aa2597888c829378b2eb3d6dfda47abfa93cd2.tar.bz2
samba-09aa2597888c829378b2eb3d6dfda47abfa93cd2.zip
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 <rob@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Diffstat (limited to 'python')
-rw-r--r--python/samba/netcmd/domain/models/claim_type.py6
1 files 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)