Mercurial > hg
changeset 52001:3af11f3e9980
zeroconf: fix a warning about a signature mismatch in a method override
Caught by PyCharm. It looks like the `hdr` arg is mostly unused (thus why it
was missing in some cases), so pass along an empty string where needed.
author | Matt Harbison <matt_harbison@yahoo.com> |
---|---|
date | Sun, 13 Oct 2024 14:46:23 +0200 |
parents | c76c1c948804 |
children | 22a50b7934d2 |
files | hgext/zeroconf/Zeroconf.py |
diffstat | 1 files changed, 5 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/hgext/zeroconf/Zeroconf.py Mon Oct 07 23:24:28 2024 -0400 +++ b/hgext/zeroconf/Zeroconf.py Sun Oct 13 14:46:23 2024 +0200 @@ -379,7 +379,7 @@ """Abstract method""" raise AbstractMethodException - def toString(self, other): + def toString(self, hdr, other): """String representation with additional information""" arg = b"%s/%s,%s" % ( self.ttl, @@ -457,7 +457,7 @@ def __repr__(self): """String representation""" - return self.toString(self.alias) + return self.toString(b'', self.alias) class DNSText(DNSRecord): @@ -480,9 +480,9 @@ def __repr__(self): """String representation""" if len(self.text) > 10: - return self.toString(self.text[:7] + b"...") + return self.toString(b'', self.text[:7] + b"...") else: - return self.toString(self.text) + return self.toString(b'', self.text) class DNSService(DNSRecord): @@ -515,7 +515,7 @@ def __repr__(self): """String representation""" - return self.toString(b"%s:%s" % (self.server, self.port)) + return self.toString(b'', b"%s:%s" % (self.server, self.port)) class DNSIncoming: