Bump version to 1.3.1. (#33)
- Reorder class declaration. - Satisfy lint. - bug fix.
This commit is contained in:
Родитель
7a5862a7de
Коммит
285ab787da
|
@ -13,18 +13,6 @@ import cognitive_face as CF
|
|||
|
||||
DEFAULT_BASE_URL = 'https://westus.api.cognitive.microsoft.com/face/v1.0/'
|
||||
|
||||
class BaseUrl(object):
|
||||
|
||||
@classmethod
|
||||
def set(cls, base_url):
|
||||
cls.base_url = base_url
|
||||
|
||||
@classmethod
|
||||
def get(cls):
|
||||
if not hasattr(cls, 'base_url'):
|
||||
cls.base_url = DEFAULT_BASE_URL
|
||||
return cls.base_url
|
||||
|
||||
TIME_SLEEP = 1
|
||||
|
||||
|
||||
|
@ -67,6 +55,19 @@ class Key(object):
|
|||
return cls.key
|
||||
|
||||
|
||||
class BaseUrl(object):
|
||||
|
||||
@classmethod
|
||||
def set(cls, base_url):
|
||||
cls.base_url = base_url
|
||||
|
||||
@classmethod
|
||||
def get(cls):
|
||||
if not hasattr(cls, 'base_url') or not cls.base_url:
|
||||
cls.base_url = DEFAULT_BASE_URL
|
||||
return cls.base_url
|
||||
|
||||
|
||||
def request(method, url, data=None, json=None, headers=None, params=None):
|
||||
# pylint: disable=too-many-arguments
|
||||
"""Universal interface for request."""
|
||||
|
|
2
setup.py
2
setup.py
|
@ -20,7 +20,7 @@ def readme():
|
|||
|
||||
setup(
|
||||
name='cognitive_face',
|
||||
version='1.3.0',
|
||||
version='1.3.1',
|
||||
packages=find_packages(exclude=['tests']),
|
||||
install_requires=['requests'],
|
||||
author='Microsoft',
|
||||
|
|
Загрузка…
Ссылка в новой задаче