components/policy/tools/syntax_check_policy_template_json.py
def _CheckNewReleasedPlatforms(self, original_platforms, new_platforms,
                                 current_version, policy_name):
    '''If released version has changed, it should be the current version unless
       there is a special reason.'''
    for platform in new_platforms:
      new_version = new_platforms[platform]
      if new_version == original_platforms.get(platform):
        continue
      if new_version == current_version - 1:
        self._Warning(
            'Policy %s on %s will be released in %d which has passed the '
            'branch point. Please merge it into Beta or change the version to '
            '%d.' % (policy_name, platform, new_version, current_version))
      elif new_version < current_version - 1:
        self.non_compatibility_error_count += 1
        self._Error(
            'Version %d has been released to Stable already. Please use '
            'version %d instead for platform %s.' %
            (new_version, current_version, platform), 'policy', policy_name)
If released version has changed, it should be the current version unless
       there is a special reason.
If released version has changed, it should be the current version unless
there is a special reason.
If released version has changed it should be the current version unless there is a special reason .
def _CheckNewReleasedPlatforms(self, original_platforms, new_platforms,
                                 current_version, policy_name):
    for platform in new_platforms:
      new_version = new_platforms[platform]
      if new_version == original_platforms.get(platform):
        continue
      if new_version == current_version - 1:
        self._Warning(
            'Policy %s on %s will be released in %d which has passed the '
            'branch point. Please merge it into Beta or change the version to '
            '%d.' % (policy_name, platform, new_version, current_version))
      elif new_version < current_version - 1:
        self.non_compatibility_error_count += 1
        self._Error(
            'Version %d has been released to Stable already. Please use '
            'version %d instead for platform %s.' %
            (new_version, current_version, platform), 'policy', policy_name)
def _CheckNewReleasedPlatforms ( self , original_platforms , new_platforms , current_version , policy_name ) : for platform in new_platforms : new_version = new_platforms [ platform ] if new_version == original_platforms . get ( platform ) : continue if new_version == current_version - 1 : self . _Warning ( 'Policy %s on %s will be released in %d which has passed the ' 'branch point. Please merge it into Beta or change the version to ' '%d.' % ( policy_name , platform , new_version , current_version ) ) elif new_version < current_version - 1 : self . non_compatibility_error_count += 1 self . _Error ( 'Version %d has been released to Stable already. Please use ' 'version %d instead for platform %s.' % ( new_version , current_version , platform ) , 'policy' , policy_name )
If released version has changed, it should be the current version unless
there is a special reason.
If released version has changed it should be the current version unless there is a special reason .
'''If released version has changed, it should be the current version unless
       there is a special reason.'''
self
original_platforms
new_platforms
current_version
policy_name