From 086861d07a2e42502be30a391bed93cc0947a542 Mon Sep 17 00:00:00 2001 From: Graham Christensen Date: Sun, 22 Mar 2020 13:03:52 -0400 Subject: [PATCH] script_defs: import only namespace from argparse --- nixops/script_defs.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nixops/script_defs.py b/nixops/script_defs.py index 1bff33b6e..48fdbc78b 100644 --- a/nixops/script_defs.py +++ b/nixops/script_defs.py @@ -7,7 +7,7 @@ import nixops.statefile import prettytable -import argparse +from argparse import Namespace import os import pwd import re @@ -66,7 +66,7 @@ def sort_deployments( # Handle the --all switch: if --all is given, return all deployments; # otherwise, return the deployment specified by -d / # $NIXOPS_DEPLOYMENT. -def one_or_all(args: argparse.Namespace) -> List[nixops.deployment.Deployment]: +def one_or_all(args: Namespace) -> List[nixops.deployment.Deployment]: if args.all: sf = nixops.statefile.StateFile(args.state_file) return sf.get_all_deployments()