Add typing to homeassistant/*.py and homeassistant/util/ (#15569)

* Add typing to homeassistant/*.py and homeassistant/util/

* Fix wrong merge

* Restore iterable in OrderedSet

* Fix tests
This commit is contained in:
Andrey
2018-07-23 11:24:39 +03:00
committed by Paulus Schoutsen
parent b7c336a687
commit 140a874917
27 changed files with 532 additions and 384 deletions

View File

@@ -4,7 +4,7 @@ import ssl
import certifi
def client_context():
def client_context() -> ssl.SSLContext:
"""Return an SSL context for making requests."""
context = ssl.create_default_context(
purpose=ssl.Purpose.SERVER_AUTH,
@@ -13,7 +13,7 @@ def client_context():
return context
def server_context():
def server_context() -> ssl.SSLContext:
"""Return an SSL context following the Mozilla recommendations.
TLS configuration follows the best-practice guidelines specified here: