1
0
mirror of https://github.com/google/comprehensive-rust.git synced 2025-07-06 06:27:53 +02:00

Format Python files with YAPF (#1360)

This commit is contained in:
Martin Geisler
2023-10-18 19:56:05 +02:00
committed by GitHub
parent 0022898ada
commit c4ce2ab8a9
4 changed files with 14 additions and 7 deletions

View File

@ -16,9 +16,9 @@ jobs:
- name: Checkout
uses: actions/checkout@v3
- name: Install Gettext
- name: Install formatting dependencies
run: |
sudo apt install gettext
sudo apt install gettext yapf3
- name: Install nightly rustfmt
run: |

View File

@ -4,13 +4,17 @@ for filename in os.popen("git diff --name-only").read().split():
if not filename.endswith(".po"):
continue
if "POT-Creation-Date" in os.popen(f"git diff --unified=0 {filename}").read():
print(f"Assuming {filename} was changed automatically, skipping msgid check")
if "POT-Creation-Date" in os.popen(
f"git diff --unified=0 {filename}").read():
print(
f"Assuming {filename} was changed automatically, skipping msgid check"
)
continue
changed_lines = {
i + 1
for i, line in enumerate(os.popen(f"git blame {filename}").readlines())
for i, line in enumerate(
os.popen(f"git blame {filename}").readlines())
if line.startswith("00000000")
}