@task(help=dict(<EOL>verbose="<STR_LIT>",<EOL>pypi="<STR_LIT>",<EOL>))<EOL>def bump(ctx, verbose=False, pypi=False):
cfg = config.load()<EOL>scm = scm_provider(cfg.project_root, commit=False, ctx=ctx)<EOL>if not scm.workdir_is_clean():<EOL><INDENT>notify.warning("<STR_LIT>")<EOL><DEDENT>pep440 = scm.pep440_dev_version(verbose=verbose, non_local=pypi)<EOL>setup_cfg = cfg.rootjoin('<STR_LIT>')<EOL>if not pep440:<EOL><INDENT>notify.info("<STR_LIT>")<EOL><DEDENT>elif os.path.exists(setup_cfg):<EOL><INDENT>with io.open(setup_cfg, encoding='<STR_LIT:utf-8>') as handle:<EOL><INDENT>data = handle.readlines()<EOL><DEDENT>changed = False<EOL>for i, line in enumerate(data):<EOL><INDENT>if re.match(r"<STR_LIT>", line):<EOL><INDENT>verb, _ = data[i].split('<STR_LIT:=>', <NUM_LIT:1>)<EOL>data[i] = '<STR_LIT>'.format(verb, pep440)<EOL>changed = True<EOL><DEDENT><DEDENT>if changed:<EOL><INDENT>notify.info("<STR_LIT>")<EOL>with io.open(setup_cfg, '<STR_LIT:w>', encoding='<STR_LIT:utf-8>') as handle:<EOL><INDENT>handle.write('<STR_LIT>'.join(data))<EOL><DEDENT><DEDENT>else:<EOL><INDENT>notify.warning("<STR_LIT>")<EOL><DEDENT><DEDENT>else:<EOL><INDENT>notify.warning("<STR_LIT>")<EOL><DEDENT>if os.path.exists(setup_cfg):<EOL><INDENT>egg_info = shell.capture("<STR_LIT>", echo=True if verbose else None)<EOL>for line in egg_info.splitlines():<EOL><INDENT>if line.endswith('<STR_LIT>'):<EOL><INDENT>pkg_info_file = line.split(None, <NUM_LIT:1>)[<NUM_LIT:1>]<EOL>with io.open(pkg_info_file, encoding='<STR_LIT:utf-8>') as handle:<EOL><INDENT>notify.info('<STR_LIT:\n>'.join(i for i in handle.readlines() if i.startswith('<STR_LIT>')).strip())<EOL><DEDENT><DEDENT><DEDENT>ctx.run("<STR_LIT>", echo=True if verbose else None)<EOL><DEDENT>
Bump a development version.