third_party/afl/update.py
def update(self, new_version):
    """
    Update the readme to reflect the new version that has been downloaded.
    """
    new_readme = self.readme_contents
    subsitutions = [(VERSION_REGEX, new_version),  # Update the version.
                    (r'Date: .*',
                     'Date: ' + datetime.date.today().strftime("%B %d, %Y")),
                    # Update the Local Modifications.
                    (PATH_REGEX + r'/', 'afl-' + new_version + '/')]

    for regex, replacement in subsitutions:
      new_readme = re.subn(regex, replacement, new_readme, 1)[0]

    self.readme_contents = new_readme
    with open(self.README_FILE_PATH, 'w+') as readme_file_handle:
      readme_file_handle.write(self.readme_contents)

    Update the readme to reflect the new version that has been downloaded.
    
Update the readme to reflect the new version that has been downloaded.
Update the readme to reflect the new version that has been downloaded .
def update(self, new_version):
    new_readme = self.readme_contents
    subsitutions = [(VERSION_REGEX, new_version),  
                    (r'Date: .*',
                     'Date: ' + datetime.date.today().strftime("%B %d, %Y")),
                    (PATH_REGEX + r'/', 'afl-' + new_version + '/')]
    for regex, replacement in subsitutions:
      new_readme = re.subn(regex, replacement, new_readme, 1)[0]
    self.readme_contents = new_readme
    with open(self.README_FILE_PATH, 'w+') as readme_file_handle:
      readme_file_handle.write(self.readme_contents)
def update ( self , new_version ) : new_readme = self . readme_contents subsitutions = [ ( VERSION_REGEX , new_version ) , ( r'Date: .*' , 'Date: ' + datetime . date . today ( ) . strftime ( "%B %d, %Y" ) ) , ( PATH_REGEX + r'/' , 'afl-' + new_version + '/' ) ] for regex , replacement in subsitutions : new_readme = re . subn ( regex , replacement , new_readme , 1 ) [ 0 ] self . readme_contents = new_readme with open ( self . README_FILE_PATH , 'w+' ) as readme_file_handle : readme_file_handle . write ( self . readme_contents )
Update the readme to reflect the new version that has been downloaded.
Update the readme to reflect the new version that has been downloaded .
"""
    Update the readme to reflect the new version that has been downloaded.
    """ # Update the version. # Update the Local Modifications.
self
new_version