Skip to content

Improve check-style.py

Hunor Csomortáni requested to merge csomh/mutter:check-style into main

I stumbled upon these issues while rebasing and fixing @jadahl's work for Add VR support under Wayland (#1743):

  1. The script did not wait for the amend command to complete, which made it unusable in a multi-step rebase. Fixed this by using subprocess.run() instead of Popen().
  2. New files were not checked and re-formatted. Fixed this by not turning off formatting when the chunk starts at line 1.

There are some other minor tweaks to improve the readability of the Python code.

Merge request reports