Skip to content

Commit 98e2b1d

Browse files
reorg imports
1 parent 953e2cb commit 98e2b1d

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

src/borg/archiver/completion_cmd.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,9 +52,6 @@
5252

5353
import shtab
5454

55-
from jsonargparse._actions import _ActionSubCommands
56-
from jsonargparse._completions import prepare_actions_context, shtab_prepare_actions, bash_compgen_typehint
57-
5855
from ._common import process_epilog
5956
from ..constants import * # NOQA
6057
from ..helpers import (
@@ -69,6 +66,8 @@
6966
parse_file_size,
7067
)
7168
from ..helpers.argparsing import ArgumentParser, RawDescriptionHelpFormatter
69+
from ..helpers.argparsing import _ActionSubCommands
70+
from ..helpers.argparsing import prepare_actions_context, shtab_prepare_actions, bash_compgen_typehint
7271
from ..helpers.time import timestamp
7372
from ..helpers.parseformat import partial_format
7473
from ..manifest import AI_HUMAN_SORT_KEYS

src/borg/helpers/argparsing.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,11 @@
55
from argparse import Action, ArgumentError, ArgumentTypeError, RawDescriptionHelpFormatter # noqa: F401
66
from jsonargparse import ArgumentParser, Namespace, SUPPRESS, REMAINDER # noqa: F401
77

8+
# borg completion uses these private symbols, so we need to import them:
9+
from jsonargparse._actions import _ActionSubCommands # noqa: F401
10+
from jsonargparse._completions import prepare_actions_context, shtab_prepare_actions # noqa: F401
11+
from jsonargparse._completions import bash_compgen_typehint # noqa: F401
12+
813

914
def flatten_namespace(ns: Any) -> Namespace:
1015
"""

0 commit comments

Comments
 (0)