Remove operatornotify, vlogging from boilerplates.
I know it wasn't long ago that I added them here. But I still often want to write small scripts that don't need these things. It's better to add them on with their separate snippets.
This commit is contained in:
parent
24d29bd75b
commit
bdc7a28dbd
3 changed files with 5 additions and 6 deletions
|
@ -1,10 +1,11 @@
|
||||||
<snippet>
|
<snippet>
|
||||||
<content><![CDATA[
|
<content><![CDATA[
|
||||||
|
import argparse
|
||||||
|
import sys
|
||||||
|
|
||||||
def $1_argparse(args):
|
def $1_argparse(args):
|
||||||
return 0
|
return 0
|
||||||
|
|
||||||
@operatornotify.main_decorator('$1')
|
|
||||||
@vlogging.main_decorator
|
|
||||||
def main(argv):
|
def main(argv):
|
||||||
parser = argparse.ArgumentParser(description=__doc__)
|
parser = argparse.ArgumentParser(description=__doc__)
|
||||||
|
|
||||||
|
@ -17,6 +18,8 @@ def main(argv):
|
||||||
args = parser.parse_args(argv)
|
args = parser.parse_args(argv)
|
||||||
return args.func(args)
|
return args.func(args)
|
||||||
|
|
||||||
|
if __name__ == '__main__':
|
||||||
|
raise SystemExit(main(sys.argv[1:]))
|
||||||
]]></content>
|
]]></content>
|
||||||
<tabTrigger>argparse</tabTrigger>
|
<tabTrigger>argparse</tabTrigger>
|
||||||
<scope>source.python</scope>
|
<scope>source.python</scope>
|
||||||
|
|
|
@ -21,7 +21,6 @@ import argparse
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
from voussoirkit import betterhelp
|
from voussoirkit import betterhelp
|
||||||
from voussoirkit import operatornotify
|
|
||||||
from voussoirkit import vlogging
|
from voussoirkit import vlogging
|
||||||
|
|
||||||
log = vlogging.getLogger(__name__, '$1')
|
log = vlogging.getLogger(__name__, '$1')
|
||||||
|
@ -31,7 +30,6 @@ def $2_argparse(args):
|
||||||
|
|
||||||
__doc__ = betterhelp.add_previews(__doc__, SUB_DOCSTRINGS)
|
__doc__ = betterhelp.add_previews(__doc__, SUB_DOCSTRINGS)
|
||||||
|
|
||||||
@operatornotify.main_decorator('$1')
|
|
||||||
@vlogging.main_decorator
|
@vlogging.main_decorator
|
||||||
def main(argv):
|
def main(argv):
|
||||||
parser = argparse.ArgumentParser(description=__doc__)
|
parser = argparse.ArgumentParser(description=__doc__)
|
||||||
|
|
|
@ -8,7 +8,6 @@ import argparse
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
from voussoirkit import betterhelp
|
from voussoirkit import betterhelp
|
||||||
from voussoirkit import operatornotify
|
|
||||||
from voussoirkit import vlogging
|
from voussoirkit import vlogging
|
||||||
|
|
||||||
log = vlogging.getLogger(__name__, '$1')
|
log = vlogging.getLogger(__name__, '$1')
|
||||||
|
@ -16,7 +15,6 @@ log = vlogging.getLogger(__name__, '$1')
|
||||||
def $1_argparse(args):
|
def $1_argparse(args):
|
||||||
return 0
|
return 0
|
||||||
|
|
||||||
@operatornotify.main_decorator('$1')
|
|
||||||
@vlogging.main_decorator
|
@vlogging.main_decorator
|
||||||
def main(argv):
|
def main(argv):
|
||||||
parser = argparse.ArgumentParser(description=__doc__)
|
parser = argparse.ArgumentParser(description=__doc__)
|
||||||
|
|
Loading…
Reference in a new issue