parameters: (self)
docstring: Updates the copyright line in the file.
docstring_summary: Updates the copyright line in the file.
docstring_tokens: Updates the copyright line in the file .
function: def update_copyright(self):
          """Updates the copyright line in the file."""
  
          # Replace the year(s)
          orig = self.matches.group(0)
          try:
  	        subst = "{0} {1}  {2}".format(self.matches.group(1), self.year_range_str, self.matches.group(2))
          except FileNotVersionedError:
              return
  
          if subst == orig:
              print('   Already up to date')
              return
          self.content = self.content.replace(orig, subst)
  
          # Write the contents to disk
          f = open(self.filename, 'w')
          f.write(self.content)
          f.close()
  
          timestamp = datetime.datetime.fromtimestamp(float(self.log[1].replace('"', ''))).strftime('%c')
  
          print("   Last commit: {0} ({1}) {2}".format(self.log[0], timestamp, self.log[2]))
          print("   Updated {0}".format(self.filename))
function_tokens: def update_copyright ( self ) : # Replace the year(s) orig = self . matches . group ( 0 ) try : subst = "{0} {1}  {2}" . format ( self . matches . group ( 1 ) , self . year_range_str , self . matches . group ( 2 ) ) except FileNotVersionedError : return if subst == orig : print ( '   Already up to date' ) return self . content = self . content . replace ( orig , subst ) # Write the contents to disk f = open ( self . filename , 'w' ) f . write ( self . content ) f . close ( ) timestamp = datetime . datetime . fromtimestamp ( float ( self . log [ 1 ] . replace ( '"' , '' ) ) ) . strftime ( '%c' ) print ( "   Last commit: {0} ({1}) {2}" . format ( self . log [ 0 ] , timestamp , self . log [ 2 ] ) ) print ( "   Updated {0}" . format ( self . filename ) )