This fixes a DeepSource alert:
Mismatched parameters in overridden method
Python will allow this, but if the overridden method is intended to be
executed from external code, you may want to reconsider this.
Overriding a method without ensuring that both methods accept the
same number and type of parameters has the potential to cause an
error when the overriding method is called with a number of parameters
that is illegal for the overridden method. This violates the Liskov
substitution principle.
Signed-off-by: Dimitri Papadopoulos <3350651-DimitriPapadopoulos@users.noreply.gitlab.com>
class SSLSocket(ssl.SSLSocket):
fingerprint = _fingerprint
- def do_handshake(self, *args, **kw):
- res = super().do_handshake(*args, **kw)
+ def do_handshake(self):
+ res = super().do_handshake()
der_bytes = self.getpeercert(True)
cert = asn1crypto.x509.Certificate.load(der_bytes)
pubkey = cert.public_key.dump()
writeHtml(" " + name + "=\"" + attrs.get(name) + "\"")
writeHtml(" />" if name == "br" else ">")
- def characters(self, ch):
- self.content += ch
+ def characters(self, content):
+ self.content += content
def endElement(self, name):