Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

check-ignore: update help output [qa] #4358

Merged
merged 4 commits into from
Aug 11, 2020
Merged
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
34 changes: 16 additions & 18 deletions dvc/command/check_ignore.py
Expand Up @@ -41,7 +41,7 @@ def _interactive_mode(self):
target = ask("")
if target == "":
logger.info(
"Empty string is not a valid pathspec. Please use . "
"An empty string is not a valid path. Please use . "
"instead if you meant to match all paths."
)
break
Expand Down Expand Up @@ -82,7 +82,9 @@ def run(self):


def add_parser(subparsers, parent_parser):
ADD_HELP = "Debug DVC ignore/exclude files"
ADD_HELP = (
"Check whether files or directories are excluded due to `.dvcignore`."
)

parser = subparsers.add_parser(
"check-ignore",
Expand All @@ -96,35 +98,31 @@ def add_parser(subparsers, parent_parser):
"--details",
action="store_true",
default=False,
help="Show the exclude pattern together with each target path.",
help="Show the exclude patterns along with each target path.",
)
parser.add_argument(
"-n",
"--non-matching",
"-a",
"--all",
action="store_true",
default=False,
help="Show the target paths which don’t match any pattern. "
"Only usable when `--details` is also employed",
help="Include the target paths which don’t match any pattern "
"in the `--details` list.",
)
parser.add_argument(
"--stdin",
"-n",
"--non-matching",
action="store_true",
default=False,
help="Read pathnames from the standard input, one per line, "
"instead of from the command-line.",
help="Include the target paths which don’t match any pattern "
"in the `--details` list.",
)
parser.add_argument(
"-a",
"--all",
"--stdin",
action="store_true",
default=False,
help="Show all of the patterns match the target paths. "
"Only usable when `--details` is also employed",
help="Read paths from standard input instead of providing `targets`.",
)
parser.add_argument(
"targets",
nargs="*",
help="Exact or wildcard paths of files or directories to check "
"ignore patterns.",
"targets", nargs="*", help="File or directory paths to check",
).complete = completion.FILE
parser.set_defaults(func=CmdCheckIgnore)