shotgunsoftware / python-api

A Python-based library for accessing Flow Production Tracking API.
https://developer.shotgridsoftware.com/python-api
Other
306 stars 198 forks source link

SG-12945: Added localized param to Shotgun object #204

Closed palisir closed 5 years ago

palisir commented 5 years ago

The goal of SG-12945 is to expose a new param "localised" on the object Shotgun, to give the ability to get localized fields when possible (only DisplayColumn at the time). Documentation is on its way too.

As discussed with @thebeeland, the requirement for tests will be evaluated by the reviewer.

thebeeland commented 5 years ago

@palisir -- for testing, would it be possible to use a similar approach to the below to test that the new init argument triggers the header value to be added to the request if it's True, and that it doesn't when it's False?

https://github.com/shotgunsoftware/python-api/blob/master/tests/test_client.py#L167-L231

manneohrstrom commented 5 years ago

Is is necessary to pass this in as part of the constructor? In other advanced cases like this (e.g. sg.config.rpc_attempt_interval = 1000), we don't always provide a ctor parameter - the __init__ is bloated as it is already.

In fact, there was a similar discussion recently - see https://github.com/shotgunsoftware/python-api/pull/196 - where we ended up adding it to the config object only.

palisir commented 5 years ago

As discussed with @manneohrstrom I am closing this PR to make a new one on another branch