Skip to content

tools: Fix bitmap converter print syntax#3592

Merged
xiaoxiang781216 merged 2 commits into
apache:masterfrom
Old-Ding:codex/bitmap-converter-python3-print
Jul 6, 2026
Merged

tools: Fix bitmap converter print syntax#3592
xiaoxiang781216 merged 2 commits into
apache:masterfrom
Old-Ding:codex/bitmap-converter-python3-print

Conversation

@Old-Ding

@Old-Ding Old-Ding commented Jul 5, 2026

Copy link
Copy Markdown
Contributor

Summary

  • update the bitmap converter usage print to Python 3 function syntax
  • keep the existing usage text and exit behavior unchanged

Verification

  • py_compile.compile('tools/bitmap_converter.py', doraise=True) succeeds
  • python tools/bitmap_converter.py prints the usage message and exits with code 1
  • git diff --check
  • git ls-files --eol tools/bitmap_converter.py

I also checked for open duplicate PRs/issues mentioning bitmap_converter.py, Missing parentheses, Python 3, and print, and found no matches.

The py_compile check created tools/__pycache__; I removed that generated directory before committing.

Use Python 3 print function syntax so bitmap_converter.py can be parsed by current Python interpreters while preserving the existing usage message and exit path.

Generated-by: OpenAI Codex
Signed-off-by: Old-Ding <35417409+Old-Ding@users.noreply.github.com>
xiaoxiang781216
xiaoxiang781216 previously approved these changes Jul 6, 2026
@xiaoxiang781216

Copy link
Copy Markdown
Contributor

@Old-Ding please fix:

1f0ec0877 Merge 391b70ec7e4c326b519b3537c93300202c1023b2 into 4d5f60005c6d91c76e4a585fe3102aab50119ec6
391b70ec7 tools: Fix bitmap converter print syntax
../nuttx/tools/checkpatch.sh -c -u -m -g 4d5f60005c6d91c76e4a585fe3102aab50119ec6..HEAD
would reformat /home/runner/work/nuttx-apps/nuttx-apps/apps/tools/bitmap_converter.py

Run the bitmap converter through the Python formatter required by checkpatch so the Python 3 print syntax fix passes the project style checks.

Signed-off-by: Old-Ding <35417409+Old-Ding@users.noreply.github.com>
@Old-Ding

Old-Ding commented Jul 6, 2026

Copy link
Copy Markdown
Contributor Author

Updated in b0434f2: ran isort with NuttX's setup.cfg and �lack on ools/bitmap_converter.py so the checkpatch formatting failure is addressed. Local checks now pass: �lack --check, isort --check-only, lake8, py_compile, and git diff --check.

@github-actions github-actions Bot added Size: M and removed Size: XS labels Jul 6, 2026
@xiaoxiang781216 xiaoxiang781216 merged commit f1d53c8 into apache:master Jul 6, 2026
41 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants