home · contact · privacy
From _User separate out _NickUserHost extras not needed on it properly.
authorChristian Heller <c.heller@plomlompom.de>
Thu, 11 Sep 2025 15:19:59 +0000 (17:19 +0200)
committerChristian Heller <c.heller@plomlompom.de>
Thu, 11 Sep 2025 15:19:59 +0000 (17:19 +0200)
ircplom/client.py

index f63d909c91891f56c9f43aaa1c23d3d7f94cc63d..af81d0e35c744a43e296fd54af38515177f6bfb0 100644 (file)
@@ -374,7 +374,7 @@ class _Channel:
         self.purge_users()
 
 
-class _NickUserHost(NickUserHost):
+class _SetNickuserhostMixin:
 
     def __setattr__(self, key: str, value: NickUserHost | str) -> None:
         if key == 'nickuserhost' and isinstance(value, NickUserHost):
@@ -383,6 +383,9 @@ class _NickUserHost(NickUserHost):
         else:
             super().__setattr__(key, value)
 
+
+class _NickUserHost(NickUserHost):
+
     @staticmethod
     def possible_from(value: str) -> bool:
         'If class instance could be parsed from value.'
@@ -413,7 +416,7 @@ class _NickUserHost(NickUserHost):
         return name + str(0 if not digits else (int(digits) + 1))
 
 
-class _User(_NickUserHost):
+class _User(_SetNickuserhostMixin, NickUserHost):
     modes: str = '?'
     exit_msg: str = ''