Skip to content

remove unused --config options from commands which don't use it#2429

Merged
asottile merged 1 commit intomainfrom
remove-config-option-when-unused
Jun 23, 2022
Merged

remove unused --config options from commands which don't use it#2429
asottile merged 1 commit intomainfrom
remove-config-option-when-unused

Conversation

@asottile
Copy link
Member

diff from the help:

diff --git a/before/_base b/after/_base
index d11959d..d8519ec 100644
--- a/before/_base
+++ b/after/_base
@@ -1,9 +1,9 @@
 usage: pre-commit [-h] [-V]
-                  {autoupdate,clean,hook-impl,gc,init-templatedir,install,install-hooks,migrate-config,run,sample-config,try-repo,uninstall,validate-config,validate-manifest,help}
+                  {autoupdate,clean,gc,init-templatedir,install,install-hooks,migrate-config,run,sample-config,try-repo,uninstall,validate-config,validate-manifest,help,hook-impl}
                   ...
 
 positional arguments:
-  {autoupdate,clean,hook-impl,gc,init-templatedir,install,install-hooks,migrate-config,run,sample-config,try-repo,uninstall,validate-config,validate-manifest,help}
+  {autoupdate,clean,gc,init-templatedir,install,install-hooks,migrate-config,run,sample-config,try-repo,uninstall,validate-config,validate-manifest,help,hook-impl}
     autoupdate          Auto-update pre-commit config to the latest repos'
                         versions.
     clean               Clean out pre-commit files.
diff --git a/before/clean b/after/clean
index 9caeeb2..9cfa4d1 100644
--- a/before/clean
+++ b/after/clean
@@ -1,8 +1,6 @@
-usage: pre-commit clean [-h] [--color {auto,always,never}] [-c CONFIG]
+usage: pre-commit clean [-h] [--color {auto,always,never}]
 
 optional arguments:
   -h, --help            show this help message and exit
   --color {auto,always,never}
                         Whether to use color in output. Defaults to `auto`.
-  -c CONFIG, --config CONFIG
-                        Path to alternate config file
diff --git a/before/gc b/after/gc
index b227ce7..97baa66 100644
--- a/before/gc
+++ b/after/gc
@@ -1,8 +1,6 @@
-usage: pre-commit gc [-h] [--color {auto,always,never}] [-c CONFIG]
+usage: pre-commit gc [-h] [--color {auto,always,never}]
 
 optional arguments:
   -h, --help            show this help message and exit
   --color {auto,always,never}
                         Whether to use color in output. Defaults to `auto`.
-  -c CONFIG, --config CONFIG
-                        Path to alternate config file
diff --git a/before/sample-config b/after/sample-config
index 69c67ae..1de26a9 100644
--- a/before/sample-config
+++ b/after/sample-config
@@ -1,8 +1,6 @@
-usage: pre-commit sample-config [-h] [--color {auto,always,never}] [-c CONFIG]
+usage: pre-commit sample-config [-h] [--color {auto,always,never}]
 
 optional arguments:
   -h, --help            show this help message and exit
   --color {auto,always,never}
                         Whether to use color in output. Defaults to `auto`.
-  -c CONFIG, --config CONFIG
-                        Path to alternate config file
diff --git a/before/validate-config b/after/validate-config
index 73bdcfc..2927105 100644
--- a/before/validate-config
+++ b/after/validate-config
@@ -1,5 +1,4 @@
 usage: pre-commit validate-config [-h] [--color {auto,always,never}]
-                                  [-c CONFIG]
                                   [filenames [filenames ...]]
 
 positional arguments:
@@ -9,5 +8,3 @@ optional arguments:
   -h, --help            show this help message and exit
   --color {auto,always,never}
                         Whether to use color in output. Defaults to `auto`.
-  -c CONFIG, --config CONFIG
-                        Path to alternate config file
diff --git a/before/validate-manifest b/after/validate-manifest
index f809370..fd74557 100644
--- a/before/validate-manifest
+++ b/after/validate-manifest
@@ -1,5 +1,4 @@
 usage: pre-commit validate-manifest [-h] [--color {auto,always,never}]
-                                    [-c CONFIG]
                                     [filenames [filenames ...]]
 
 positional arguments:
@@ -9,5 +8,3 @@ optional arguments:
   -h, --help            show this help message and exit
   --color {auto,always,never}
                         Whether to use color in output. Defaults to `auto`.
-  -c CONFIG, --config CONFIG
-                        Path to alternate config file

@asottile asottile merged commit 170335c into main Jun 23, 2022
@asottile asottile deleted the remove-config-option-when-unused branch June 23, 2022 03:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant