We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 7aa7873 commit bd7a372Copy full SHA for bd7a372
zerobin/remove_paste.py
@@ -1,4 +1,8 @@
1
+#!/usr/bin/env python
2
+# coding: utf-8
3
+
4
from zerobin.paste import Paste
5
+from sigtools.modifiers import annotate, autokwoargs
6
from clize import run
7
import re
8
@@ -16,17 +20,18 @@ def unpack_paste(paste):
16
20
return try_url.group('paste_id')
17
21
return paste
18
22
19
-
-def remove_paste(*pastes, quiet:'q'=False):
23
+@annotate(quiet='q')
24
+@autokwoargs
25
+def remove_paste(quiet=False, *pastes):
26
"""
27
Remove pastes, given its ID or its URL
28
- pastes: List of pastes, given by ID or URL
29
quiet: Don't print anything
30
31
+ pastes: List of pastes, given by ID or URL
32
33
- for paste_uuid in map(unpack_paste, paste_list):
34
+ for paste_uuid in map(unpack_paste, pastes):
35
try:
36
Paste.load(paste_uuid).delete()
37
0 commit comments