diff --git a/pychromecast/__init__.py b/pychromecast/__init__.py
index <HASH>..<HASH> 100644
--- a/pychromecast/__init__.py
+++ b/pychromecast/__init__.py
@@ -363,10 +363,8 @@ class Chromecast:
     def ignore_cec(self):
         """ Returns whether the CEC data should be ignored. """
         return self.device is not None and any(
-            [
-                fnmatch.fnmatchcase(self.device.friendly_name, pattern)
-                for pattern in IGNORE_CEC
-            ]
+            fnmatch.fnmatchcase(self.device.friendly_name, pattern)
+            for pattern in IGNORE_CEC
         )
 
     @property
diff --git a/pychromecast/socket_client.py b/pychromecast/socket_client.py
index <HASH>..<HASH> 100644
--- a/pychromecast/socket_client.py
+++ b/pychromecast/socket_client.py
@@ -340,7 +340,8 @@ class SocketClient(threading.Thread):
                         self.port,
                     )
                     self.socket.connect((self.host, self.port))
-                    self.socket = ssl.wrap_socket(self.socket)
+                    context = ssl.SSLContext()
+                    self.socket = context.wrap_socket(self.socket)
                     self.connecting = False
                     self._force_recon = False
                     self._report_connection_status(
Adapt to pylint <I> (#<I>)