From cd8be06b9e0cb7cc5c9d0f2cf20cdd96817d0abc Mon Sep 17 00:00:00 2001 From: willGraham01 <1willgraham@gmail.com> Date: Wed, 20 Dec 2023 11:17:21 +0000 Subject: [PATCH] All hail our glorious linter --- cellfinder/cli_migration_warning.py | 29 +++++++++++++++++++---------- 1 file changed, 19 insertions(+), 10 deletions(-) diff --git a/cellfinder/cli_migration_warning.py b/cellfinder/cli_migration_warning.py index cea55100..e90f60c2 100644 --- a/cellfinder/cli_migration_warning.py +++ b/cellfinder/cli_migration_warning.py @@ -1,5 +1,4 @@ import argparse -import sys BRAINGLOBE_WORKFLOWS = "https://github.com/brainglobe/brainglobe-workflows" NEW_NAME = "brainmapper" @@ -8,29 +7,39 @@ def cli_catch() -> None: """ - Will be executed if the user attempts to run 'cellfinder' from the command-line. - Reports that this CLI tool is now only available as a workflow from brainglobe-workflows, - and has a new name to boot. + Will be executed if the user attempts to run 'cellfinder' from the + command-line. + Reports that this CLI tool is now only available as a workflow from + brainglobe-workflows, and has a new name to boot. Relevant links are provided. - Argparse is used so that the CLI arguments are caught, but they are not processed. - The --help feature is overwritten to force argparse to display the migration message regardless - of user input. + Argparse is used so that the CLI arguments are caught, but they are + not processed. + The --help feature is overwritten to force argparse to display the + migration message regardless of user input. """ parser = argparse.ArgumentParser( "cellfinder", - description="Migration warning if users are trying to use the cellfinder name for the workflow/ CLI tool now provided by brainglobe-workflows.", + description=( + "Migration warning if users are trying to use the cellfinder" + " name for the workflow/ CLI tool now provided by" + " brainglobe-workflows." + ), add_help=False, ) parser.add_argument( "catch-all", nargs="*", - help="Catch any input arguments to prevent error throws. All arguments are ignored.", + help=( + "Catch any input arguments to prevent error throws." + " All arguments are ignored." + ), ) print( "Hey, it looks like you're trying to run the old command-line tool.", - "This workflow has been renamed and moved - you can now find it in the brainglobe-workflows package:\n", + "This workflow has been renamed and moved -", + " you can now find it in the brainglobe-workflows package:\n", f"\t{BRAINGLOBE_WORKFLOWS}\n", f"\tusing the name {NEW_NAME}\n", f"For more information, see our blog post: {BLOG_POST}",