Skip to content
This repository has been archived by the owner on Jan 15, 2025. It is now read-only.

Bump applying patch #34

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 0 additions & 13 deletions .travis.yml

This file was deleted.

8 changes: 5 additions & 3 deletions hoprd_sdk/api_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,21 +10,22 @@
"""
from __future__ import absolute_import

import atexit
import datetime
import json
import mimetypes
from multiprocessing.pool import ThreadPool
import os
import re
import tempfile
from multiprocessing.pool import ThreadPool

# python 2 and python 3 compatibility library
import six
from six.moves.urllib.parse import quote

from hoprd_sdk.configuration import Configuration
import hoprd_sdk.models
from hoprd_sdk import rest
from hoprd_sdk.configuration import Configuration


class ApiClient(object):
Expand Down Expand Up @@ -58,6 +59,7 @@
'datetime': datetime.datetime,
'object': object,
}
_pool = None

def __init__(self, configuration=None, header_name=None, header_value=None,
cookie=None):
Expand Down Expand Up @@ -263,7 +265,7 @@
if data is None:
return None

if type(klass) == str:
if isinstance(klass, str):
if klass.startswith('list['):
sub_kls = re.match(r'list\[(.*)\]', klass).group(1)
return [self.__deserialize(sub_data, sub_kls)
Expand Down Expand Up @@ -458,7 +460,7 @@
for k, v in six.iteritems(files):
if not v:
continue
file_names = v if type(v) is list else [v]

Check failure on line 463 in hoprd_sdk/api_client.py

View workflow job for this annotation

GitHub Actions / Lint

Do not compare types, use `isinstance()`

Check failure on line 463 in hoprd_sdk/api_client.py

View workflow job for this annotation

GitHub Actions / Lint

Ruff (E721)

hoprd_sdk/api_client.py:463:35: E721 Do not compare types, use `isinstance()`
for n in file_names:
with open(n, 'rb') as f:
filename = os.path.basename(f.name)
Expand Down
Loading
Loading