tools/traffic_annotation/scripts/update_annotations_doc.py
def _update_chrome_version(self, doc):
    """Gets the chrome version (MAJOR.MINOR.BUILD.PATCH) from src/chrome/VERSION
    and updates the doc to reflect the correct version.
    """
    version = ""
    with open(os.path.join(SRC_DIR, "chrome/VERSION"), "r") as version_file:
      version = ".".join(line.strip().split("=")[1]
                         for line in version_file.readlines())

    current_version = generator_utils.find_chrome_browser_version(doc)
    replacement = "Chrome Browser version {}".format(version)
    target = "Chrome Browser version {}".format(current_version)

    if replacement == target:
      print("Document chrome version is already up to date.")
      return

    req = [{
        "replaceAllText": {
            "containsText": {
                "text": target,
                "matchCase": True
            },
            "replaceText": replacement
        }
    }]
    self._perform_requests(req)
    print("Updated document chrome version {} --> {}".format(
        current_version, version))
Gets the chrome version (MAJOR.MINOR.BUILD.PATCH) from src/chrome/VERSION
    and updates the doc to reflect the correct version.
    
Gets the chrome version (MAJOR.MINOR.BUILD.PATCH) from src/chrome/VERSION
and updates the doc to reflect the correct version.
Gets the chrome version ( MAJOR . MINOR . BUILD . PATCH ) from src / chrome / VERSION and updates the doc to reflect the correct version .
def _update_chrome_version(self, doc):
    version = ""
    with open(os.path.join(SRC_DIR, "chrome/VERSION"), "r") as version_file:
      version = ".".join(line.strip().split("=")[1]
                         for line in version_file.readlines())
    current_version = generator_utils.find_chrome_browser_version(doc)
    replacement = "Chrome Browser version {}".format(version)
    target = "Chrome Browser version {}".format(current_version)
    if replacement == target:
      print("Document chrome version is already up to date.")
      return
    req = [{
        "replaceAllText": {
            "containsText": {
                "text": target,
                "matchCase": True
            },
            "replaceText": replacement
        }
    }]
    self._perform_requests(req)
    print("Updated document chrome version {} --> {}".format(
        current_version, version))
def _update_chrome_version ( self , doc ) : version = "" with open ( os . path . join ( SRC_DIR , "chrome/VERSION" ) , "r" ) as version_file : version = "." . join ( line . strip ( ) . split ( "=" ) [ 1 ] for line in version_file . readlines ( ) ) current_version = generator_utils . find_chrome_browser_version ( doc ) replacement = "Chrome Browser version {}" . format ( version ) target = "Chrome Browser version {}" . format ( current_version ) if replacement == target : print ( "Document chrome version is already up to date." ) return req = [ { "replaceAllText" : { "containsText" : { "text" : target , "matchCase" : True } , "replaceText" : replacement } } ] self . _perform_requests ( req ) print ( "Updated document chrome version {} --> {}" . format ( current_version , version ) )
Gets the chrome version (MAJOR.MINOR.BUILD.PATCH) from src/chrome/VERSION
and updates the doc to reflect the correct version.
Gets the chrome version ( MAJOR . MINOR . BUILD . PATCH ) from src / chrome / VERSION and updates the doc to reflect the correct version .
"""Gets the chrome version (MAJOR.MINOR.BUILD.PATCH) from src/chrome/VERSION
    and updates the doc to reflect the correct version.
    """
self
doc