From ef57c2e2d42c7d2c1cf2b7fd4ff801c394c8efe7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emilio=20L=C3=B3pez?= Date: Mon, 19 Feb 2024 22:40:22 -0300 Subject: [PATCH] slither, slither-doctor: fix completion generation --- slither/__main__.py | 4 ++-- slither/tools/doctor/__main__.py | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/slither/__main__.py b/slither/__main__.py index fc81eed7c..a3777e990 100644 --- a/slither/__main__.py +++ b/slither/__main__.py @@ -279,7 +279,7 @@ def parse_filter_paths(args: argparse.Namespace) -> List[str]: def parse_args( detector_classes: List[Type[AbstractDetector]], printer_classes: List[Type[AbstractPrinter]] ) -> argparse.Namespace: - usage = "slither target [flag]\n" + usage = "slither target [options]\n" usage += "\ntarget can be:\n" usage += "\t- file.sol // a Solidity file\n" usage += "\t- project_directory // a project directory. See https://github.com/crytic/crytic-compile/#crytic-compile for the supported platforms\n" @@ -293,7 +293,7 @@ def parse_args( shtab.add_argument_to(parser) - parser.add_argument("filename", help=argparse.SUPPRESS) + parser.add_argument("filename", metavar="target", help="File or project target, see above") cryticparser.init(parser) diff --git a/slither/tools/doctor/__main__.py b/slither/tools/doctor/__main__.py index c8d54f239..a388e9104 100644 --- a/slither/tools/doctor/__main__.py +++ b/slither/tools/doctor/__main__.py @@ -30,12 +30,12 @@ def parse_args() -> argparse.Namespace: def main() -> None: - # log on stdout to keep output in order - logging.basicConfig(stream=sys.stdout, level=logging.DEBUG, force=True) - args = parse_args() kwargs = vars(args) + # log on stdout to keep output in order + logging.basicConfig(stream=sys.stdout, level=logging.DEBUG, force=True) + for check in ALL_CHECKS: with report_section(check.title): check.function(**kwargs)