File: autoprint.py

package info (click to toggle)
python-invoke 1.4.1%2Bds-0.1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 1,704 kB
  • sloc: python: 11,377; makefile: 18; sh: 12
file content (26 lines) | stat: -rw-r--r-- 365 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
from invoke.tasks import task
from invoke.collection import Collection


@task
def nope(c):
    return "You can't see this"


@task(autoprint=True)
def yup(c):
    return "It's alive!"


@task(pre=[yup])
def pre_check(c):
    pass


@task(post=[yup])
def post_check(c):
    pass


sub = Collection("sub", yup)
ns = Collection(nope, yup, pre_check, post_check, sub)