
from invoke import task, run


@task
def clean():
    run("rm -rf .coverage dist build")


@task(clean, default=True)
def test():
    run("py.test")


@task(test)
def install():
    run("pandoc --from=markdown --to=rst README.md -o README.rst")
    run("python setup.py develop")


@task(test)
def release():
    run("pandoc --from=markdown --to=rst README.md -o README.rst")
    run("python setup.py register sdist bdist_wheel")
    run("twine upload dist/*")


@task(test)
def bump(version="patch"):
    run("bumpversion %s" % version)
    run("git commit --amend")


from invoke import task


@task
def clean(context):
    context.run("rm -rf .coverage dist build")


@task(clean, default=True)
def test(context):
    context.run("py.test")


@task(test)
def install(context):
    context.run("pandoc --from=markdown --to=rst README.md -o README.rst")
    context.run("python setup.py develop")


@task(test)
def release(context):
    context.run("pandoc --from=markdown --to=rst README.md -o README.rst")
    context.run("python setup.py register sdist bdist_wheel")
    context.run("twine upload dist/*")


@task(test)
def bump(context, version="patch"):
    context.run("bumpversion %s" % version)
    context.run("git commit --amend")

Use new invoke's context parameter
Use new invoke's context parameter

  
- from invoke import task, run
+ from invoke import task
  
  
  @task
- def clean():
+ def clean(context):
-     run("rm -rf .coverage dist build")
+     context.run("rm -rf .coverage dist build")
  
  
  @task(clean, default=True)
- def test():
+ def test(context):
-     run("py.test")
+     context.run("py.test")
  
  
  @task(test)
- def install():
+ def install(context):
-     run("pandoc --from=markdown --to=rst README.md -o README.rst")
+     context.run("pandoc --from=markdown --to=rst README.md -o README.rst")
-     run("python setup.py develop")
+     context.run("python setup.py develop")
  
  
  @task(test)
- def release():
+ def release(context):
-     run("pandoc --from=markdown --to=rst README.md -o README.rst")
+     context.run("pandoc --from=markdown --to=rst README.md -o README.rst")
-     run("python setup.py register sdist bdist_wheel")
+     context.run("python setup.py register sdist bdist_wheel")
-     run("twine upload dist/*")
+     context.run("twine upload dist/*")
  
  
  @task(test)
- def bump(version="patch"):
+ def bump(context, version="patch"):
-     run("bumpversion %s" % version)
+     context.run("bumpversion %s" % version)
-     run("git commit --amend")
+     context.run("git commit --amend")
  
Use new invoke's context parameter
## Code Before:

from invoke import task, run


@task
def clean():
    run("rm -rf .coverage dist build")


@task(clean, default=True)
def test():
    run("py.test")


@task(test)
def install():
    run("pandoc --from=markdown --to=rst README.md -o README.rst")
    run("python setup.py develop")


@task(test)
def release():
    run("pandoc --from=markdown --to=rst README.md -o README.rst")
    run("python setup.py register sdist bdist_wheel")
    run("twine upload dist/*")


@task(test)
def bump(version="patch"):
    run("bumpversion %s" % version)
    run("git commit --amend")

## Instruction:
Use new invoke's context parameter
## Code After:

from invoke import task


@task
def clean(context):
    context.run("rm -rf .coverage dist build")


@task(clean, default=True)
def test(context):
    context.run("py.test")


@task(test)
def install(context):
    context.run("pandoc --from=markdown --to=rst README.md -o README.rst")
    context.run("python setup.py develop")


@task(test)
def release(context):
    context.run("pandoc --from=markdown --to=rst README.md -o README.rst")
    context.run("python setup.py register sdist bdist_wheel")
    context.run("twine upload dist/*")


@task(test)
def bump(context, version="patch"):
    context.run("bumpversion %s" % version)
    context.run("git commit --amend")
