1
0
Fork 0
mirror of https://github.com/yavook/kiwi-scp.git synced 2024-11-21 20:33:00 +00:00

move pass_instance decorator

This commit is contained in:
Jörn-Michael Miehe 2021-10-29 13:37:59 +02:00
parent 69a0938daf
commit 829938e44f
3 changed files with 7 additions and 4 deletions

View file

@ -2,6 +2,8 @@ import os
import click
from ..instance import Instance
class KiwiCLI(click.MultiCommand):
"""Command Line Interface spread over multiple files in this directory"""
@ -23,3 +25,6 @@ class KiwiCLI(click.MultiCommand):
except ImportError:
return
return mod.cmd
pass_instance = click.make_pass_decorator(Instance, ensure=True)

View file

@ -5,9 +5,10 @@ from pathlib import Path
import click
from .cli import pass_instance
from .._constants import KIWI_CONF_NAME
from ..config import KiwiConfig
from ..instance import Instance, pass_instance
from ..instance import Instance
from ..misc import user_query

View file

@ -84,6 +84,3 @@ class Instance:
for service in services
if service.name in service_names
])
pass_instance = click.make_pass_decorator(Instance, ensure=True)