Skip to content

Commit cbcf06c

Browse files
reorg imports
1 parent 0eb25bd commit cbcf06c

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-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: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@
44
# all other imports of these names import them from here:
55
from argparse import Action, ArgumentError, ArgumentTypeError, RawDescriptionHelpFormatter # noqa: F401
66
from jsonargparse import ArgumentParser, Namespace, SUPPRESS, REMAINDER # noqa: F401
7+
# borg completion uses these private symbols, so we need to import them:
8+
from jsonargparse._actions import _ActionSubCommands # noqa: F401
9+
from jsonargparse._completions import prepare_actions_context, shtab_prepare_actions, bash_compgen_typehint # noqa: F401
710

811

912
def flatten_namespace(ns: Any) -> Namespace:

0 commit comments

Comments
 (0)