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:
voussoir 2021-08-24 23:53:38 -07:00
parent 24d29bd75b
commit bdc7a28dbd
No known key found for this signature in database
GPG key ID: 5F7554F8C26DACCB
3 changed files with 5 additions and 6 deletions

View file

@ -1,10 +1,11 @@
<snippet>
<content><![CDATA[
import argparse
import sys
def $1_argparse(args):
return 0
@operatornotify.main_decorator('$1')
@vlogging.main_decorator
def main(argv):
parser = argparse.ArgumentParser(description=__doc__)
@ -17,6 +18,8 @@ def main(argv):
args = parser.parse_args(argv)
return args.func(args)
if __name__ == '__main__':
raise SystemExit(main(sys.argv[1:]))
]]></content>
<tabTrigger>argparse</tabTrigger>
<scope>source.python</scope>

View file

@ -21,7 +21,6 @@ import argparse
import sys
from voussoirkit import betterhelp
from voussoirkit import operatornotify
from voussoirkit import vlogging
log = vlogging.getLogger(__name__, '$1')
@ -31,7 +30,6 @@ def $2_argparse(args):
__doc__ = betterhelp.add_previews(__doc__, SUB_DOCSTRINGS)
@operatornotify.main_decorator('$1')
@vlogging.main_decorator
def main(argv):
parser = argparse.ArgumentParser(description=__doc__)

View file

@ -8,7 +8,6 @@ import argparse
import sys
from voussoirkit import betterhelp
from voussoirkit import operatornotify
from voussoirkit import vlogging
log = vlogging.getLogger(__name__, '$1')
@ -16,7 +15,6 @@ log = vlogging.getLogger(__name__, '$1')
def $1_argparse(args):
return 0
@operatornotify.main_decorator('$1')
@vlogging.main_decorator
def main(argv):
parser = argparse.ArgumentParser(description=__doc__)