File: decorator.py

package info (click to toggle)
python-invoke 0.11.1%2Bdfsg1-1
  • links: PTS, VCS
  • area: main
  • in suites: buster, stretch
  • size: 1,136 kB
  • ctags: 1,702
  • sloc: python: 5,614; makefile: 37; sh: 36
file content (54 lines) | stat: -rw-r--r-- 730 bytes parent folder | download
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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
from invoke.tasks import task


@task(aliases=('bar', 'otherbar'))
def foo():
    """
    Foo the bar.
    """
    pass

@task
def foo2():
    """
    Foo the bar:

      example code

    Added in 1.0
    """
    pass

@task
def foo3():
    """Foo the other bar:

      example code

    Added in 1.1
    """
    pass

@task(default=True)
def biz():
    pass

@task(help={'why': 'Motive', 'who': 'Who to punch'})
def punch(who, why):
    pass

@task(positional=['pos'])
def one_positional(pos, nonpos):
    pass

@task(positional=['pos1', 'pos2'])
def two_positionals(pos1, pos2, nonpos):
    pass

@task
def implicit_positionals(pos1, pos2, nonpos=None):
    pass

@task(optional=['myopt'])
def optional_values(myopt):
    pass