Skip to content

Commit 2bb3b04

Browse files
committed
Fix some lint issues
1 parent 97bd70f commit 2bb3b04

File tree

3 files changed

+10
-3
lines changed

3 files changed

+10
-3
lines changed

requirements.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
requests==2.22.0
22
timeout-decorator==0.4.1
3+
urllib3==1.25.3

src/vws/query.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
1+
"""
2+
Tools for interacting with the Vuforia Cloud Recognition Web APIs.
3+
"""
4+
15
import io
6+
from typing import Any, Dict, List
27
from urllib.parse import urljoin
38

49
import requests
@@ -25,7 +30,7 @@ def __init__(
2530
self._client_access_key = client_access_key.encode()
2631
self._client_secret_key = client_secret_key.encode()
2732

28-
def query(self, image: io.BytesIO) -> str:
33+
def query(self, image: io.BytesIO) -> List[Dict[str, Any]]:
2934
"""
3035
Use the Vuforia Web Query API to make an Image Recognition Query.
3136
@@ -73,4 +78,4 @@ def query(self, image: io.BytesIO) -> str:
7378
data=content,
7479
)
7580

76-
return response.json()['results']
81+
return list(response.json()['results'])

tests/conftest.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,8 @@ def vws_client(_mock_database: VuforiaDatabase) -> Iterator[VWS]:
3838

3939

4040
@pytest.fixture()
41-
def cloud_reco_client(_mock_database: VuforiaDatabase) -> Iterator[VWS]:
41+
def cloud_reco_client(_mock_database: VuforiaDatabase,
42+
) -> Iterator[CloudRecoService]:
4243
"""
4344
Yield a ``CloudRecoService`` client which connects to a mock database.
4445
"""

0 commit comments

Comments
 (0)