lupyuen commented on PR #16257:
URL: https://github.com/apache/nuttx/pull/16257#issuecomment-2829087353

   @TimJTi Could you fix this Python Formatting? Thanks!
   
https://github.com/apache/nuttx/actions/runs/14650017368/job/41125074665?pr=16257#step:5:226
   ```
   2025-04-24 23:47:29 [INFO]   Linting PYTHON_BLACK items...
     Error: -24 23:47:30 [ERROR]   Found errors when linting PYTHON_BLACK. Exit 
code: 1.
     2025-04-24 23:47:30 [INFO]   Command output for PYTHON_BLACK:
     ------
     --- /github/workspace/tools/splashscreen_converter.py      2025-04-24 
23:47:22.045204+00:00
     +++ /github/workspace/tools/splashscreen_converter.py      2025-04-24 
23:47:30.111930+00:00
     @@ -25,11 +25,11 @@
              outfile.write("#ifdef CONFIG_VIDEO_FB_SPLASHSCREEN_BPP32
     ")
              outfile.write("static const fb_pixel_t palette[] =
     ")
              outfile.write("{
     ")
      
              for i in range(0, len(palette), 4):
     -            for r, g, b, a in palette[i:i + 4]:
     +            for r, g, b, a in palette[i : i + 4]:
                      outfile.write("  MKRGB(%d, %d, %d, %d),
     " % (a, r, g, b))
      
              outfile.write("};
     ")
              outfile.write("#endif
     
     +    )
          outfile.write("  %d," % img.height)
     -    outfile.write(("/* height in pixels                                   
*/
     ").rjust(77 - lh, " "))
     -    outfile.write("  palette,             /* Colour palette               
                      */
     ")
     -    outfile.write("  bitmap,              /* Pointer to the start of the 
RLE data               */
     ")
     +    outfile.write(
     +        ("/* height in pixels                                   */
     ").rjust(
     +            77 - lh, " "
     +        )
     +    )
     +    outfile.write(
     +        "  palette,             /* Colour palette                         
            */
     "
     +    )
     +    outfile.write(
     +        "  bitmap,              /* Pointer to the start of the RLE data   
            */
     "
     +    )
          outfile.write("};
     ")
      
      
      if __name__ == "__main__":
          import os.path
     @@ -151,11 +163,12 @@
          img = Image.open(sys.argv[1]).convert("RGBA")
          file = os.path.realpath(path + "/" + filename)
          outfile = open(file, "w")
          palette_argb = get_palette(img)
          palette_rgb = get_palette(img.convert("RGB"))
     -    
outfile.write("""/****************************************************************************
     +    outfile.write(
     +        
"""/****************************************************************************
       * %(file)s
       *
       * SPDX-License-Identifier: Apache-2.0
       *
       * Licensed to the Apache Software Foundation (ASF) under one or more
     @@ -192,11 +205,12 @@
      
      
/****************************************************************************
       * Private Data
       
****************************************************************************/
      
     -""" % {"file": path + "/" + filename, "src": os.path.relpath(sys.argv[1])}
     +"""
     +        % {"file": path + "/" + filename, "src": 
os.path.relpath(sys.argv[1])}
          )
      
          name = "splscr"
      
          write_palette(outfile, palette_argb, "ARGB")
     @@ -205,11 +219,13 @@
          write_image(outfile, img, palette_argb, "BPP32")
          write_image(outfile, img, palette_rgb, "BPP24")
          write_image(outfile, img.convert("L"), None, "GREY")
          write_image(outfile, img.convert("1"), None, "MONO")
          write_descriptor(outfile, name)
     -    outfile.write("""
     +    outfile.write(
     +        """
      
/****************************************************************************
       * Private Functions
       
****************************************************************************/
     -""")
     +"""
     +    )
          print("Created %s from %s" % (file, sys.argv[1]))
     ------
     2025-04-24 23:47:30 [INFO]   Stderr contents for PYTHON_BLACK:
     ------
     would reformat /github/workspace/tools/splashscreen_converter.py
     
     Oh no! 💥 💔 💥
     1 file would be reformatted.
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to