Skip to content

Commit

Permalink
Rename subcommand from list-files to debug
Browse files Browse the repository at this point in the history
  • Loading branch information
deveshks committed Jun 28, 2020
1 parent b9d19a6 commit 2fcad8f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion news/6741.feature
@@ -1 +1 @@
Add a subcommand ``list-files`` to ``pip config`` to list available configuration files and their location
Add a subcommand ``debug`` to ``pip config`` to list available configuration sources and the key-value pairs defined in them.
8 changes: 4 additions & 4 deletions src/pip/_internal/commands/configuration.py
Expand Up @@ -35,7 +35,7 @@ class ConfigurationCommand(Command):
- get: Get the value associated with name
- set: Set the name=value
- unset: Unset the value associated with name
- list-files: List the configuration files
- debug: List the configuration files and values defined under them
If none of --user, --global and --site are passed, a virtual
environment configuration file is used if one is active and the file
Expand Down Expand Up @@ -107,7 +107,7 @@ def run(self, options, args):
"get": self.get_name,
"set": self.set_name_value,
"unset": self.unset_name,
"debug": self.list_config_files,
"debug": self.list_config_values,
}

# Determine action
Expand Down Expand Up @@ -193,8 +193,8 @@ def unset_name(self, options, args):

self._save_configuration()

def list_config_files(self, options, args):
self._get_n_args(args, "list-files", n=0)
def list_config_values(self, options, args):
self._get_n_args(args, "debug", n=0)
for variant, files in sorted(self.configuration.iter_config_files()):
write_output("%s:", variant)
for fname in files:
Expand Down

0 comments on commit 2fcad8f

Please sign in to comment.