Skip to content

Commit

Permalink
Add pragma no cover to deprecated flags check
Browse files Browse the repository at this point in the history
  • Loading branch information
timothycrosley committed Jul 6, 2020
1 parent f6ca70e commit defefc2
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions isort/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -401,8 +401,7 @@ def _build_arg_parser() -> argparse.ArgumentParser:
"--sd",
"--section-default",
dest="default_section",
help="Sets the default section for import options: "
+ str(sections.DEFAULT),
help="Sets the default section for import options: " + str(sections.DEFAULT),
)
parser.add_argument(
"--sg",
Expand Down Expand Up @@ -674,11 +673,11 @@ def main(argv: Optional[Sequence[str]] = None, stdin: Optional[TextIOWrapper] =
write_to_stdout = config_dict.pop("write_to_stdout", False)
deprecated_flags = config_dict.pop("deprecated_flags", False)

if deprecated_flags:
if deprecated_flags: # pragma: no cover
warn(
f"\n\nThe following deprecated CLI flags where used: {', '.join(deprecated_flags)}!\n"
"Please see the 5.0.0 upgrade guide:\n"
"\thttps://timothycrosley.github.io/isort/docs/upgrade_guides/5.0.0/\n",
"\thttps://timothycrosley.github.io/isort/docs/upgrade_guides/5.0.0/\n"
)

if "src_paths" in config_dict:
Expand Down

0 comments on commit defefc2

Please sign in to comment.