(self, app)
Removes 'empty' (less than or equal to 4 lines, as that is what they begin with) views, admin, and tests
            files.
Removes 'empty' (less than or equal to 4 lines, as that is what they begin with) views, admin, and tests
            files.
Removes empty ( less than or equal to 4 lines as that is what they begin with ) views admin and tests files .
def remove_empty_startapp_files(self, app):
        """
            Removes 'empty' (less than or equal to 4 lines, as that is what they begin with) views, admin, and tests
            files.
        """
        for file_name in ["views", "admin", "tests"]:
            file_path = "%s/%s.py" % (app.path, file_name)
            if os.path.exists(file_path):
                num_lines = sum(1 for line in open(file_path))
                if num_lines <= 4:
                    os.remove(file_path)
def remove_empty_startapp_files ( self , app ) : for file_name in [ "views" , "admin" , "tests" ] : file_path = "%s/%s.py" % ( app . path , file_name ) if os . path . exists ( file_path ) : num_lines = sum ( 1 for line in open ( file_path ) ) if num_lines <= 4 : os . remove ( file_path )