Merge pull request #257 from mhchia/fix/add-missing-initpy

Fix the issue when importing from other package
This commit is contained in:
Kevin Mai-Husan Chia 2019-08-22 16:32:34 +08:00 committed by GitHub
commit 46b4a446c3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 4 additions and 2 deletions

View File

View File

View File

@ -33,7 +33,8 @@ class SimpleSecurityTransport(BaseSecureTransport):
# NOTE: this is abusing the abstraction we have here # NOTE: this is abusing the abstraction we have here
# but this code may be deprecated soon and this exists # but this code may be deprecated soon and this exists
# mainly to satisfy a test that will go along w/ it # mainly to satisfy a test that will go along w/ it
session.key_phrase = self.key_phrase # FIXME: Enable type check back when we can deprecate the simple transport.
session.key_phrase = self.key_phrase # type: ignore
return session return session
async def secure_outbound(self, conn: IRawConnection, peer_id: ID) -> ISecureConn: async def secure_outbound(self, conn: IRawConnection, peer_id: ID) -> ISecureConn:
@ -58,5 +59,6 @@ class SimpleSecurityTransport(BaseSecureTransport):
# NOTE: this is abusing the abstraction we have here # NOTE: this is abusing the abstraction we have here
# but this code may be deprecated soon and this exists # but this code may be deprecated soon and this exists
# mainly to satisfy a test that will go along w/ it # mainly to satisfy a test that will go along w/ it
session.key_phrase = self.key_phrase # FIXME: Enable type check back when we can deprecate the simple transport.
session.key_phrase = self.key_phrase # type: ignore
return session return session