#NEWLINE# @ classmethod #NEWLINE# def _correct_package( self , package ) : #NEWLINE# #INDENT# package = package . replace ( '/' , '.' ) #NEWLINE# package = re . sub ( '^\\.+' , '' , package ) #NEWLINE# package = re . sub ( '\\.+$' , '' , package ) #NEWLINE# if ( re . search ( '\\.{2,}' , package ) is not None ) : #NEWLINE# #INDENT# raise ValueError ( 'Package name cannot have consecutive periods! ({})' . format ( package ) ) #NEWLINE# #UNINDENT# return package