Change True to 'True' in requests.get params.

According to stubs from mypy 0.4.7 onwards, `requests.get` takes
a parameter `params` of type `Dict[AnyStr, AnyStr]` where `AnyStr`
can be either bytes or text.  Actually, requests can accept values
of other types in dicts too but it casts them to a string type.

So to avoid type checking error messages, change `True` to `'True'`.
This commit is contained in:
Eklavya Sharma 2017-02-01 12:38:36 +05:30 committed by Tim Abbott
parent 863df67150
commit 1ee3e476f3

View file

@ -77,7 +77,7 @@ def make_api_call(path):
# type: (str) -> Optional[List[Dict[str, Any]]]
response = requests.get("https://api3.codebasehq.com/%s" % (path,),
auth=(config.CODEBASE_API_USERNAME, config.CODEBASE_API_KEY),
params={'raw': True},
params={'raw': 'True'},
headers = {"User-Agent": user_agent,
"Content-Type": "application/json",
"Accept": "application/json"})