components/policy/tools/syntax_check_policy_template_json.py
def _GetReleasedPlatforms(self, policy, current_version):
    '''
    Returns a dictionary that contains released platforms and their released
    version. Returns empty dictionary if policy is None or policy.future is
    True.

    Args:
      policy: A dictionary contains all policy data from policy_templates.json.
      current_version: A integer represents the current major milestone.

    Returns:
      released_platforms: A dictionary contains all platforms that have been
                          released to stable and their released version.
      rolling_out_platform: A dictionary contains all platforms that have been
                            released but haven't reached stable.
      Example:
      {
        'chrome.win' : 10,
        'chrome_os': '10,
      }, {
        'chrome.mac': 15,
      }
    '''

    released_platforms = {}
    rolling_out_platform = {}
    if not policy or policy.get('future', False):
      return released_platforms, rolling_out_platform

    for supported_on in policy.get('supported_on', []):
      supported_platform, supported_from, _ = \
              _GetSupportedVersionPlatformAndRange(supported_on)
      if supported_from < current_version - 1:
        released_platforms[supported_platform] = supported_from
      else:
        rolling_out_platform[supported_platform] = supported_from

    released_platforms = ExpandChromeStar(released_platforms)
    rolling_out_platform = ExpandChromeStar(rolling_out_platform)

    return released_platforms, rolling_out_platform

    Returns a dictionary that contains released platforms and their released
    version. Returns empty dictionary if policy is None or policy.future is
    True.

    Args:
      policy: A dictionary contains all policy data from policy_templates.json.
      current_version: A integer represents the current major milestone.

    Returns:
      released_platforms: A dictionary contains all platforms that have been
                          released to stable and their released version.
      rolling_out_platform: A dictionary contains all platforms that have been
                            released but haven't reached stable.
      Example:
      {
        'chrome.win' : 10,
        'chrome_os': '10,
      }, {
        'chrome.mac': 15,
      }
    
Returns a dictionary that contains released platforms and their released
version. Returns empty dictionary if policy is None or policy.future is
True.
Returns a dictionary that contains released platforms and their released version . Returns empty dictionary if policy is None or policy . future is True .
def _GetReleasedPlatforms(self, policy, current_version):
    released_platforms = {}
    rolling_out_platform = {}
    if not policy or policy.get('future', False):
      return released_platforms, rolling_out_platform
    for supported_on in policy.get('supported_on', []):
      supported_platform, supported_from, _ = \
              _GetSupportedVersionPlatformAndRange(supported_on)
      if supported_from < current_version - 1:
        released_platforms[supported_platform] = supported_from
      else:
        rolling_out_platform[supported_platform] = supported_from
    released_platforms = ExpandChromeStar(released_platforms)
    rolling_out_platform = ExpandChromeStar(rolling_out_platform)
    return released_platforms, rolling_out_platform
def _GetReleasedPlatforms ( self , policy , current_version ) : released_platforms = { } rolling_out_platform = { } if not policy or policy . get ( 'future' , False ) : return released_platforms , rolling_out_platform for supported_on in policy . get ( 'supported_on' , [ ] ) : supported_platform , supported_from , _ = _GetSupportedVersionPlatformAndRange ( supported_on ) if supported_from < current_version - 1 : released_platforms [ supported_platform ] = supported_from else : rolling_out_platform [ supported_platform ] = supported_from released_platforms = ExpandChromeStar ( released_platforms ) rolling_out_platform = ExpandChromeStar ( rolling_out_platform ) return released_platforms , rolling_out_platform
Returns a dictionary that contains released platforms and their released
version.
Returns a dictionary that contains released platforms and their released version .
'''
    Returns a dictionary that contains released platforms and their released
    version. Returns empty dictionary if policy is None or policy.future is
    True.

    Args:
      policy: A dictionary contains all policy data from policy_templates.json.
      current_version: A integer represents the current major milestone.

    Returns:
      released_platforms: A dictionary contains all platforms that have been
                          released to stable and their released version.
      rolling_out_platform: A dictionary contains all platforms that have been
                            released but haven't reached stable.
      Example:
      {
        'chrome.win' : 10,
        'chrome_os': '10,
      }, {
        'chrome.mac': 15,
      }
    '''
A dictionary contains all platforms that have been
released to stable and their released version.
rolling_out_platform: A dictionary contains all platforms that have been
released but haven't reached stable.
A dictionary contains all platforms that have been released to stable and their released version . rolling_out_platform : A dictionary contains all platforms that have been released but haven ' t reached stable .
released_platforms
self
policy
A dictionary contains all policy data from policy_templates.json.
A dictionary contains all policy data from policy_templates . json .
current_version
A integer represents the current major milestone.
A integer represents the current major milestone .