Skip to content
This repository has been archived by the owner on Nov 8, 2021. It is now read-only.

Commit

Permalink
Bump version to 1.3.1. (#33)
Browse files Browse the repository at this point in the history
- Reorder class declaration.
- Satisfy lint.
- bug fix.
  • Loading branch information
huxuan authored May 17, 2017
1 parent 7a5862a commit 285ab78
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 13 deletions.
25 changes: 13 additions & 12 deletions cognitive_face/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,18 +13,6 @@

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


Expand Down Expand Up @@ -67,6 +55,19 @@ def get(cls):
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."""
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down

0 comments on commit 285ab78

Please sign in to comment.