Merge pull request #1003 from LeastAuthority/3637.mypy-vs-allmydata-test
Fix src/allmydata/test mypy errors w/ Twisted 21.2.0 Fixes: ticket:3637
This commit is contained in:
commit
e15c4184f4
|
@ -323,7 +323,7 @@ class AdoptedServerPort(object):
|
|||
"""
|
||||
prefix = "adopt-socket"
|
||||
|
||||
def parseStreamServer(self, reactor, fd):
|
||||
def parseStreamServer(self, reactor, fd): # type: ignore # https://twistedmatrix.com/trac/ticket/10134
|
||||
log.msg("Adopting {}".format(fd))
|
||||
# AdoptedStreamServerEndpoint wants to own the file descriptor. It
|
||||
# will duplicate it and then close the one we pass in. This means it
|
||||
|
@ -425,6 +425,9 @@ class DummyProducer(object):
|
|||
def resumeProducing(self):
|
||||
pass
|
||||
|
||||
def stopProducing(self):
|
||||
pass
|
||||
|
||||
@implementer(IImmutableFileNode)
|
||||
class FakeCHKFileNode(object): # type: ignore # incomplete implementation
|
||||
"""I provide IImmutableFileNode, but all of my data is stored in a
|
||||
|
|
|
@ -175,6 +175,3 @@ class NoDefault(unittest.TestCase):
|
|||
self.yaml_path.setContent(yamlutil.safe_dump(connections))
|
||||
myclient = yield create_client(self.basedir)
|
||||
self.assertEquals(len(myclient.introducer_clients), 0)
|
||||
|
||||
if __name__ == "__main__":
|
||||
unittest.main()
|
||||
|
|
|
@ -30,9 +30,6 @@ MAX_DELTA_READS = 10 * READ_LEEWAY # N = 10
|
|||
timeout=240 # François's ARM box timed out after 120 seconds of Verifier.test_corrupt_crypttext_hashtree
|
||||
|
||||
class RepairTestMixin(object):
|
||||
def failUnlessIsInstance(self, x, xtype):
|
||||
self.failUnless(isinstance(x, xtype), x)
|
||||
|
||||
def _count_reads(self):
|
||||
sum_of_read_counts = 0
|
||||
for (i, ss, storedir) in self.iterate_servers():
|
||||
|
|
|
@ -108,7 +108,7 @@ class FakeNodeMaker(NodeMaker):
|
|||
return n.create(contents, version=version)
|
||||
|
||||
class FakeUploader(service.Service):
|
||||
name = "uploader"
|
||||
name = "uploader" # type: ignore # https://twistedmatrix.com/trac/ticket/10135
|
||||
helper_furl = None
|
||||
helper_connected = False
|
||||
|
||||
|
@ -254,7 +254,7 @@ class FakeLeaseChecker(object):
|
|||
"remaining-wait-time": 0}
|
||||
|
||||
class FakeStorageServer(service.MultiService):
|
||||
name = 'storage'
|
||||
name = 'storage' # type: ignore # https://twistedmatrix.com/trac/ticket/10135
|
||||
def __init__(self, nodeid, nickname):
|
||||
service.MultiService.__init__(self)
|
||||
self.my_nodeid = nodeid
|
||||
|
|
Loading…
Reference in New Issue