Skip to content

Commit f1a0a42

Browse files
author
Pedro Crespo
committed
Fixed linter error
1 parent 5161825 commit f1a0a42

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

packages/service-library/src/servicelib/openapi.py

+5-5
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,11 @@
55
from pathlib import Path
66
from typing import Dict, Tuple
77

8-
import openapi_core
98
import yaml
9+
10+
import openapi_core
1011
from aiohttp import ClientSession
11-
from openapi_core.schema.exceptions import \
12-
OpenAPIError # pylint: disable=W0611
13-
from openapi_core.schema.exceptions import OpenAPIMappingError
12+
from openapi_core.schema.exceptions import OpenAPIError, OpenAPIMappingError # pylint: disable=W0611
1413
from openapi_core.schema.specs.models import Spec
1514
from yarl import URL
1615

@@ -33,7 +32,8 @@ def load_from_path(filepath: Path) -> Tuple[Dict, str]:
3332

3433

3534
async def load_from_url(url: URL) -> Tuple[Dict, str]:
36-
async with ClientSession() as session:
35+
TIMEOUT_SECS = 5*60
36+
async with ClientSession(timeout=TIMEOUT_SECS) as session:
3737
async with session.get(url) as resp:
3838
spec_dict = yaml.safe_load(resp.content)
3939
return spec_dict, str(url)

0 commit comments

Comments
 (0)