From b56f3e7c5d008d1ed749b575b0300b777b736ef7 Mon Sep 17 00:00:00 2001 From: Zhangrp Date: Thu, 8 Dec 2022 16:10:02 +0800 Subject: [PATCH] Reformat. --- spacy/displacy/__init__.py | 4 +++- spacy/util.py | 3 ++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/spacy/displacy/__init__.py b/spacy/displacy/__init__.py index 63658518e..990fe0504 100644 --- a/spacy/displacy/__init__.py +++ b/spacy/displacy/__init__.py @@ -114,7 +114,9 @@ def serve( raise ValueError(Errors.E1048.format(host=host)) if available_port != port: - warnings.warn(Warnings.W124.format(host=host, port=port, available_port=available_port)) + warnings.warn( + Warnings.W124.format(host=host, port=port, available_port=available_port) + ) httpd = simple_server.make_server(host, available_port, app) print(f"\nUsing the '{style}' visualizer") diff --git a/spacy/util.py b/spacy/util.py index ef9db0a72..308eba028 100644 --- a/spacy/util.py +++ b/spacy/util.py @@ -32,6 +32,7 @@ import inspect import pkgutil import logging import socket + try: import cupy.random except ImportError: @@ -1747,4 +1748,4 @@ def is_port_in_use(port): except socket.error: return True finally: - s.close() \ No newline at end of file + s.close()