Stop sub-classing object (#8249)

This commit is contained in:
Patrick Cloke 2020-09-04 06:54:56 -04:00 committed by GitHub
parent 9f8abdcc38
commit c619253db8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
168 changed files with 293 additions and 292 deletions

View file

@ -86,7 +86,7 @@ def _make_scheduler(reactor):
return _scheduler
class IPBlacklistingResolver(object):
class IPBlacklistingResolver:
"""
A proxy for reactor.nameResolver which only produces non-blacklisted IP
addresses, preventing DNS rebinding attacks on URL preview.
@ -133,7 +133,7 @@ class IPBlacklistingResolver(object):
r.resolutionComplete()
@provider(IResolutionReceiver)
class EndpointReceiver(object):
class EndpointReceiver:
@staticmethod
def resolutionBegan(resolutionInProgress):
pass
@ -192,7 +192,7 @@ class BlacklistingAgentWrapper(Agent):
)
class SimpleHttpClient(object):
class SimpleHttpClient:
"""
A simple, no-frills HTTP client with methods that wrap up common ways of
using HTTP in Matrix
@ -244,7 +244,7 @@ class SimpleHttpClient(object):
)
@implementer(IReactorPluggableNameResolver)
class Reactor(object):
class Reactor:
def __getattr__(_self, attr):
if attr == "nameResolver":
return nameResolver