Source code for pyscaffold.extensions.no_skeleton

# -*- coding: utf-8 -*-
Extension that omits the creation of file ``

from ..api import Extension
from ..api import helpers

[docs]class NoSkeleton(Extension): """Omit creation of and"""
[docs] def activate(self, actions): """Activate extension Args: actions (list): list of actions to perform Returns: list: updated list of actions """ return self.register( actions, self.remove_files, after='define_structure')
[docs] def remove_files(self, struct, opts): """Remove all skeleton files from structure Args: struct (dict): project representation as (possibly) nested :obj:`dict`. opts (dict): given options, see :obj:`create_project` for an extensive list. Returns: struct, opts: updated project representation and options """ # Namespace is not yet applied so deleting from package is enough file = [opts['project'], 'src', opts['package'], ''] struct = helpers.reject(struct, file) file = [opts['project'], 'tests', ''] struct = helpers.reject(struct, file) return struct, opts