[1/3] utils: checkstyle: Remove leading colon from pycodestyle messages
diff mbox series

Message ID 20240830125311.1702053-2-stefan.klug@ideasonboard.com
State Superseded
Headers show
Series
  • Python improvements to checkstyle.py
Related show

Commit Message

Stefan Klug Aug. 30, 2024, 12:52 p.m. UTC
The pycodestyle messages contain a leading ': ' which is not nice to look at.
Ignore it.

Signed-off-by: Stefan Klug <stefan.klug@ideasonboard.com>
---
 utils/checkstyle.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Laurent Pinchart Aug. 30, 2024, 2:46 p.m. UTC | #1
Hi Stefan,

Thank you for the patch.

On Fri, Aug 30, 2024 at 02:52:58PM +0200, Stefan Klug wrote:
> The pycodestyle messages contain a leading ': ' which is not nice to look at.
> Ignore it.

Could you provide a before/after example in the commit message ? With
that,

Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>

> Signed-off-by: Stefan Klug <stefan.klug@ideasonboard.com>
> ---
>  utils/checkstyle.py | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/utils/checkstyle.py b/utils/checkstyle.py
> index c9e41d4149f7..c6016f60a446 100755
> --- a/utils/checkstyle.py
> +++ b/utils/checkstyle.py
> @@ -711,7 +711,7 @@ class MesonChecker(StyleChecker):
>  
>  class Pep8Checker(StyleChecker):
>      patterns = ('*.py',)
> -    results_regex = re.compile(r'stdin:([0-9]+):([0-9]+)(.*)')
> +    results_regex = re.compile(r'stdin:([0-9]+):([0-9]+): (.*)')
>  
>      def __init__(self, content):
>          super().__init__()

Patch
diff mbox series

diff --git a/utils/checkstyle.py b/utils/checkstyle.py
index c9e41d4149f7..c6016f60a446 100755
--- a/utils/checkstyle.py
+++ b/utils/checkstyle.py
@@ -711,7 +711,7 @@  class MesonChecker(StyleChecker):
 
 class Pep8Checker(StyleChecker):
     patterns = ('*.py',)
-    results_regex = re.compile(r'stdin:([0-9]+):([0-9]+)(.*)')
+    results_regex = re.compile(r'stdin:([0-9]+):([0-9]+): (.*)')
 
     def __init__(self, content):
         super().__init__()