diff --git a/mypy/ipc.py b/mypy/ipc.py index 744cb376d6dcb..d3c97df8d6ad2 100644 --- a/mypy/ipc.py +++ b/mypy/ipc.py @@ -272,7 +272,7 @@ def __enter__(self) -> IPCServer: else: try: self.connection, _ = self.sock.accept() - except socket.timeout as e: + except TimeoutError as e: raise IPCException("The socket timed out") from e return self diff --git a/pyproject.toml b/pyproject.toml index 6caf5b1b3b836..38596ac2609d1 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -116,7 +116,7 @@ force-exclude = ''' [tool.ruff] line-length = 99 -target-version = "py39" +target-version = "py310" fix = true extend-exclude = [ @@ -160,6 +160,7 @@ ignore = [ "B007", # Loop control variable not used within the loop body. "B011", # Don't use assert False "B023", # Function definition does not bind loop variable + "B905", # zip-without-explicit-strict "E2", # conflicts with black "E402", # module level import not at top of file "E501", # conflicts with black