From dca98b8698675f7286953da28dbae18f7f728cb9 Mon Sep 17 00:00:00 2001 From: Daylin Morgan Date: Thu, 19 Jan 2023 13:43:42 -0600 Subject: [PATCH] style: linting --- src/help.py | 9 ++++----- task.mk | 10 +++++----- 2 files changed, 9 insertions(+), 10 deletions(-) diff --git a/src/help.py b/src/help.py index eeae323..6a80903 100644 --- a/src/help.py +++ b/src/help.py @@ -22,7 +22,7 @@ MaxLens = namedtuple("MaxLens", "goal msg") ###- double dollar signs to prevent make escaping them -### ###- re.X requires all important whitespace is escaped -### pattern = re.compile( - r""" + r""" ^\#\#\ (?P.*?)\s?\|\s?(?P.*?) \s? @@ -42,9 +42,8 @@ pattern = re.compile( (?P.*?) )? $$ - """ - ,re.X - + """, + re.X, ) goal_pattern = re.compile(r"""^(?!#|\t)(.*):.*\n\t""", re.MULTILINE) @@ -208,7 +207,7 @@ def print_help(): def print_arg_help(help_args): print(f"{ansi.style('task.mk recipe help','header')}\n") for arg in help_args.split(): - print("\n".join((*parse_goal(gen_makefile(), arg),'\n'))) + print("\n".join((*parse_goal(gen_makefile(), arg), "\n"))) def main(): diff --git a/task.mk b/task.mk index 23f6e9f..064592d 100644 --- a/task.mk +++ b/task.mk @@ -1,7 +1,7 @@ # }> [github.com/daylinmorgan/task.mk] <{ # # Copyright (c) 2022 Daylin Morgan # MIT License -# version: v22.9.28-7-gfa977c4-dev +# version: v22.9.28-8-g4fcab2adev # # task.mk should be included at the bottom of your Makefile with `-include .task.mk` # See below for the standard configuration options that should be set prior to including this file. @@ -91,7 +91,7 @@ $(utils_py) a = ansi = Ansi(target="stdout") MaxLens = namedtuple("MaxLens", "goal msg") pattern = re.compile( - r""" + r""" ^\#\#\ (?P.*?)\s?\|\s?(?P.*?) \s? @@ -111,8 +111,8 @@ pattern = re.compile( (?P.*?) )? $$ - """ - ,re.X + """, + re.X, ) goal_pattern = re.compile(r"""^(?!#|\t)(.*):.*\n\t""", re.MULTILINE) def parseargs(argstring): @@ -250,7 +250,7 @@ def print_help(): def print_arg_help(help_args): print(f"{ansi.style('task.mk recipe help','header')}\n") for arg in help_args.split(): - print("\n".join((*parse_goal(gen_makefile(), arg),'\n'))) + print("\n".join((*parse_goal(gen_makefile(), arg), "\n"))) def main(): help_args = os.getenv("HELP_ARGS") if help_args: