File tree Expand file tree Collapse file tree 1 file changed +3
-18
lines changed Expand file tree Collapse file tree 1 file changed +3
-18
lines changed Original file line number Diff line number Diff line change @@ -52,15 +52,6 @@ def main():
52
52
default = None ,
53
53
help = "Set working root directory (default .)" ,
54
54
)
55
- parser .add_argument (
56
- "-S" ,
57
- "--source-dir" ,
58
- metavar = "<path>" ,
59
- dest = "source_dir" ,
60
- default = None ,
61
- help = "Set path to source directory. "
62
- + "The default is the current directory." ,
63
- )
64
55
deprecated_args .add_argument (
65
56
"-c" ,
66
57
"--config" ,
@@ -167,19 +158,13 @@ def main():
167
158
DeprecationWarning ,
168
159
)
169
160
170
- # Determine the root directory based on the -S and -r flags .
161
+ # Determine the root directory based on the -r flag .
171
162
rootpath = None
172
- if args .source_dir and args .rootdir :
173
- raise RuntimeError (
174
- "Cannot specify both --source-dir (-S) and --rootdir (-r)." ,
175
- )
176
- if not args .source_dir and not args .rootdir :
163
+ if not args .rootdir :
177
164
rootpath = os .getcwd ()
178
- elif args .source_dir :
179
- rootpath = args .source_dir
180
165
elif args .rootdir :
181
166
warnings .warn (
182
- "--rootdir (-r) is deprecated. Use --source-dir (-S) instead. " ,
167
+ "--rootdir (-r) is deprecated." ,
183
168
DeprecationWarning ,
184
169
)
185
170
rootpath = args .rootdir
You can’t perform that action at this time.
0 commit comments