From 433aa426b627e2721f0a66917aa41afbdf97ae58 Mon Sep 17 00:00:00 2001 From: John Pennycook Date: Wed, 6 Mar 2024 13:42:05 -0800 Subject: [PATCH] Remove --source (-S) option We are contemplating adding support for per-platform source directories in a future release. Adding such functionality would make the -S flag harder to understand, as some users may expect to be able to specify -S multiple times. To avoid being stuck supporting -S after 1.2.0, remove it for now. Signed-off-by: John Pennycook --- bin/codebasin | 21 +++------------------ 1 file changed, 3 insertions(+), 18 deletions(-) diff --git a/bin/codebasin b/bin/codebasin index 13ec52d..d149ee2 100755 --- a/bin/codebasin +++ b/bin/codebasin @@ -52,15 +52,6 @@ def main(): default=None, help="Set working root directory (default .)", ) - parser.add_argument( - "-S", - "--source-dir", - metavar="", - dest="source_dir", - default=None, - help="Set path to source directory. " - + "The default is the current directory.", - ) deprecated_args.add_argument( "-c", "--config", @@ -167,19 +158,13 @@ def main(): DeprecationWarning, ) - # Determine the root directory based on the -S and -r flags. + # Determine the root directory based on the -r flag. rootpath = None - if args.source_dir and args.rootdir: - raise RuntimeError( - "Cannot specify both --source-dir (-S) and --rootdir (-r).", - ) - if not args.source_dir and not args.rootdir: + if not args.rootdir: rootpath = os.getcwd() - elif args.source_dir: - rootpath = args.source_dir elif args.rootdir: warnings.warn( - "--rootdir (-r) is deprecated. Use --source-dir (-S) instead.", + "--rootdir (-r) is deprecated.", DeprecationWarning, ) rootpath = args.rootdir