How to use the flit.log.enable_colourful_output function in flit

To help you get started, we’ve selected a few flit examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github takluyver / flit / flit / View on Github external
cf = args.ini_file
    if (
        args.subcmd not in {'init'}
        and cf == pathlib.Path('pyproject.toml')
        and not cf.is_file()
        # Fallback to flit.ini if it's present
        cf_ini = pathlib.Path('flit.ini')
        if cf_ini.is_file():
            args.ini_file = cf_ini
            sys.exit('Neither pyproject.toml nor flit.ini found, '
                     'and no other config file path specified')

    enable_colourful_output(logging.DEBUG if args.debug else logging.INFO)

    log.debug("Parsed arguments %r", args)

    if args.logo:
        from .logo import clogo

    if args.subcmd == 'build':
        from .build import main
            main(args.ini_file, formats=set(args.format or []),
        except(common.NoDocstringError, common.VCSError, common.NoVersionError) as e:
    elif args.subcmd == 'publish':
github jhamrick / plotchecker / View on Github external
def install_plotchecker(symlink):
    from pathlib import Path
    from flit.install import Installer
    from flit.log import enable_colourful_output
    import mock

    # Hack to make docs build on RTD
    MOCK_MODULES = ['numpy', 'matplotlib', 'matplotlib.pyplot', 'matplotlib.colors', 'matplotlib.markers']
    for mod_name in MOCK_MODULES:
        sys.modules[mod_name] = mock.Mock()

    p = Path('flit.ini')
    Installer(p, symlink=symlink, deps='none').install()