@@ -97,29 +97,27 @@ def create_parser(
97
97
98
98
add_parser = subparsers .add_parser (
99
99
"add" ,
100
- help = "add a new repository to the configuration" ,
100
+ help = "add a repository to the configuration" ,
101
101
formatter_class = argparse .RawDescriptionHelpFormatter ,
102
- description = "Adds a new repository to the vcspull configuration file." ,
102
+ description = "Add a repository to the vcspull configuration file." ,
103
103
)
104
104
create_add_subparser (add_parser )
105
105
106
106
add_from_fs_parser = subparsers .add_parser (
107
107
"add-from-fs" ,
108
- help = "scan a directory for git repositories and add them to the configuration" ,
108
+ help = "scan filesystem for git repositories and add them to the configuration" ,
109
109
formatter_class = argparse .RawDescriptionHelpFormatter ,
110
- description = "Scans a directory for git repositories and adds them to the vcspull configuration file." ,
110
+ description = "Scan a directory for git repositories and add them to the vcspull configuration file." ,
111
111
)
112
112
create_add_from_fs_subparser (add_from_fs_parser )
113
113
114
- all_subparsers_dict = {
115
- "sync" : sync_parser ,
116
- "add" : add_parser ,
117
- "add_from_fs" : add_from_fs_parser ,
118
- }
119
-
120
- if get_all_subparsers :
121
- return parser , subparsers , all_subparsers_dict
122
-
114
+ if get_all_subparsers and return_subparsers :
115
+ all_parsers = {
116
+ "sync" : sync_parser ,
117
+ "add" : add_parser ,
118
+ "add_from_fs" : add_from_fs_parser ,
119
+ }
120
+ return parser , subparsers , all_parsers
123
121
if return_subparsers :
124
122
return parser , sync_parser
125
123
return parser
@@ -169,7 +167,7 @@ def cli(_args: list[str] | None = None) -> None:
169
167
else None ,
170
168
}
171
169
add_repo (** add_repo_kwargs )
172
- elif args .subparser_name == "add_from_fs " :
170
+ elif args .subparser_name == "add-from-fs " :
173
171
all_parsers ["add_from_fs" ]
174
172
add_from_fs_kwargs = {
175
173
"scan_dir_str" : args .scan_dir ,
0 commit comments