from pathlib import Path
from textwrap import dedent


def _default_config(config_dir=None):
    """Default configuration Python file, with a plugin placeholder."""

    if not config_dir:  # pragma: no cover
        config_dir = Path.home() / '.phy'
    path = config_dir / 'plugins'
    return dedent("""
    # You can also put your plugins in ~/.phy/plugins/.

    from phy import IPlugin

    # Plugin example:
    #
    # class MyPlugin(IPlugin):
    #     def attach_to_cli(self, cli):
    #         # you can create phy subcommands here with click
    #         pass

    c = get_config()
    c.Plugins.dirs = [r'{}']
    """.format(path))