Skip to content

Commit 2ca7d00

Browse files
authored
Format YAMLs with yamlfix (#142)
1 parent 96d1f51 commit 2ca7d00

8 files changed

Lines changed: 60 additions & 49 deletions

File tree

.github/ISSUE_TEMPLATE/config.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
blank_issues_enabled: true
2+
23
contact_links:
34
- name: Discord Python Polska
45
url: https://discord.com/invite/VCyBDGH38e

.github/ISSUE_TEMPLATE/typo.yml

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
name: Błąd w tłumaczeniu
22
description: Zgłoś błąd w tłumaczeniu
3-
labels: ["bug"]
3+
labels: [bug]
4+
45
body:
56
- type: markdown
67
attributes:
@@ -16,22 +17,15 @@ body:
1617
Więcej informacji znajdziesz w naszym [README](https://github.com/python/python-docs-pl/blob/3.15/README.md).
1718
- type: textarea
1819
attributes:
19-
label: "Opis błędu:"
20+
label: 'Opis błędu:'
2021
description: >
2122
Opisz szczegółowo błąd i jego lokalizację.
2223
validations:
2324
required: true
2425
- type: dropdown
2526
attributes:
26-
label: "Wersja dokumentacji:"
27+
label: 'Wersja dokumentacji:'
2728
multiple: true
28-
options:
29-
- "3.10"
30-
- "3.11"
31-
- "3.12"
32-
- "3.13"
33-
- "3.14"
34-
- "3.15"
35-
- "3.16"
29+
options: ['3.10', '3.11', '3.12', '3.13', '3.14', '3.15', '3.16']
3630
validations:
3731
required: false

.github/dependabot.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
version: 2
2+
23
updates:
3-
- package-ecosystem: "github-actions"
4-
directory: "/"
4+
- package-ecosystem: github-actions
5+
directory: /
56
schedule:
67
interval: monthly
78
groups:
89
actions:
9-
patterns:
10-
- "*"
10+
patterns: ['*']
1111
cooldown:
1212
default-days: 7

.github/workflows/pre-commit.yml

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,22 @@
11
name: pre-commit
2+
23
on:
34
schedule:
4-
- cron: '0 0 * * 1,5'
5+
- cron: 0 0 * * 1,5
6+
57
env:
68
FORCE_COLOR: 1
9+
710
permissions: {}
11+
812
jobs:
913
lint:
1014
runs-on: ubuntu-latest
1115
steps:
12-
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
16+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
1317
with:
1418
persist-credentials: false
15-
- uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
19+
- uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
1620
with:
17-
python-version: "3.x"
18-
- uses: tox-dev/action-pre-commit-uv@41a04ab74d5ec7ca33c8db8a59b6e3291d576033 # v1.0.4
21+
python-version: 3.x
22+
- uses: tox-dev/action-pre-commit-uv@41a04ab74d5ec7ca33c8db8a59b6e3291d576033 # v1.0.4

.github/workflows/update-lint-and-build.yml

Lines changed: 28 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,9 @@ name: Translation and Linting Workflow
22

33
on:
44
schedule:
5-
- cron: '0 * * * *'
5+
- cron: 0 * * * *
66
push:
7-
branches:
8-
- '*'
7+
branches: ['*']
98
workflow_dispatch:
109

1110
permissions: {}
@@ -20,10 +19,10 @@ jobs:
2019
permissions:
2120
contents: write # commit and push
2221
steps:
23-
- uses: styfle/cancel-workflow-action@d07a454dad7609a92316b57b23c9ccfd4f59af66 # 0.13.1
22+
- uses: styfle/cancel-workflow-action@d07a454dad7609a92316b57b23c9ccfd4f59af66 # 0.13.1
2423
with:
2524
access_token: ${{ secrets.GITHUB_TOKEN }}
26-
- uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
25+
- uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
2726
with:
2827
python-version: 3
2928
- name: Install dependencies
@@ -32,7 +31,7 @@ jobs:
3231
pip install requests cogapp polib transifex-python sphinx-intl blurb six
3332
curl -o- https://raw.githubusercontent.com/transifex/cli/master/install.sh | bash
3433
working-directory: /usr/local/bin
35-
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
34+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
3635
with:
3736
ref: ${{ matrix.version }}
3837
fetch-depth: 0
@@ -50,7 +49,7 @@ jobs:
5049
if: ${{ hashFiles('README.md') != '' }}
5150
env:
5251
TX_TOKEN: ${{ secrets.TX_TOKEN }}
53-
- name: Update README.en.md
52+
- name: Update README.en.md
5453
run: python -Werror -m cogapp -rP README.en.md
5554
if: ${{ hashFiles('README.en.md') != '' }}
5655
env:
@@ -59,12 +58,14 @@ jobs:
5958
- run: git config --local user.name "GitHub Action's update-translation job"
6059
- name: Check changes significance
6160
run: >
62-
! git diff -I'^"POT-Creation-Date: ' -I'^"Language-Team: ' -I'^# ' -I'^"Last-Translator: ' -I'^"Project-Id-Version: ' --exit-code && echo "SIGNIFICANT_CHANGES=1" >> "$GITHUB_ENV" || exit 0
61+
! git diff -I'^"POT-Creation-Date: ' -I'^"Language-Team: ' -I'^# ' -I'^"Last-Translator:
62+
' -I'^"Project-Id-Version: ' --exit-code && echo "SIGNIFICANT_CHANGES=1" >> "$GITHUB_ENV"
63+
|| exit 0
6364
- run: git add .
6465
- run: git commit -m "$(python manage_translation.py generate_commit_msg)"
6566
if: env.SIGNIFICANT_CHANGES
6667
- name: Push commit
67-
uses: ad-m/github-push-action@881a6320fdb16eb5318c5054f31c218aec2b324c # v1.3.0
68+
uses: ad-m/github-push-action@881a6320fdb16eb5318c5054f31c218aec2b324c # v1.3.0
6869
if: env.SIGNIFICANT_CHANGES
6970
with:
7071
branch: ${{ matrix.version }}
@@ -76,18 +77,18 @@ jobs:
7677
fail-fast: false
7778
matrix:
7879
version: [3.15, 3.14, 3.13, 3.12, 3.11]
79-
needs: ['update']
80+
needs: [update]
8081
continue-on-error: true
8182
steps:
82-
- uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
83+
- uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
8384
with:
8485
python-version: 3
8586
- run: pip install sphinx-lint
86-
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
87+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
8788
with:
8889
ref: ${{ matrix.version }}
8990
persist-credentials: false
90-
- uses: rffontenelle/sphinx-lint-problem-matcher@4270bf50b2c93640a7cbb231c09f8e694699af9f # v1.0.0
91+
- uses: rffontenelle/sphinx-lint-problem-matcher@4270bf50b2c93640a7cbb231c09f8e694699af9f # v1.0.0
9192
- run: sphinx-lint
9293

9394
build:
@@ -97,19 +98,19 @@ jobs:
9798
matrix:
9899
version: [3.15, 3.14, 3.13, 3.12, 3.11, '3.10']
99100
format: [html, latex, epub]
100-
needs: ['update']
101+
needs: [update]
101102
steps:
102-
- uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
103+
- uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
103104
with:
104-
python-version: 3.12 # pin for Sphinx 3.4.3 in 3.10 branch (see #63)
105-
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
105+
python-version: 3.12 # pin for Sphinx 3.4.3 in 3.10 branch (see # 63)
106+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
106107
with:
107108
repository: python/cpython
108109
ref: ${{ matrix.version }}
109110
persist-credentials: false
110111
- run: make venv
111112
working-directory: ./Doc
112-
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
113+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
113114
with:
114115
ref: ${{ matrix.version }}
115116
path: Doc/locales/pl/LC_MESSAGES
@@ -118,10 +119,10 @@ jobs:
118119
working-directory: ./Doc/locales/pl/LC_MESSAGES
119120
- run: sudo apt-get update && sudo apt-get install -y librsvg2-bin
120121
if: ${{ matrix.format == 'latex' && fromJSON(matrix.version) >= 3.14 }}
121-
- uses: sphinx-doc/github-problem-matcher@1f74d6599f4a5e89a20d3c99aab4e6a70f7bda0f # v1.1
122+
- uses: sphinx-doc/github-problem-matcher@1f74d6599f4a5e89a20d3c99aab4e6a70f7bda0f # v1.1
122123
- run: make -e SPHINXOPTS="--color -D language='pl' -W --keep-going" ${{ matrix.format }}
123124
working-directory: ./Doc
124-
- uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
125+
- uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
125126
if: success() || failure()
126127
with:
127128
name: build-${{ matrix.version }}-${{ matrix.format }}
@@ -132,15 +133,15 @@ jobs:
132133
strategy:
133134
matrix:
134135
version: [3.15, 3.14, 3.13, 3.12, 3.11, '3.10']
135-
needs: ['build']
136+
needs: [build]
136137
steps:
137-
- uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
138+
- uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
138139
with:
139140
name: build-${{ matrix.version }}-latex
140141
- run: sudo apt-get update
141142
- run: sudo apt-get install -y latexmk texlive-xetex fonts-freefont-otf xindy
142143
- run: make
143-
- uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
144+
- uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
144145
with:
145146
name: build-${{ matrix.version }}-pdf
146147
path: .
@@ -150,14 +151,14 @@ jobs:
150151
strategy:
151152
matrix:
152153
version: [3.15, 3.14]
153-
needs: ['build']
154+
needs: [build]
154155
continue-on-error: true
155156
steps:
156-
- uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
157+
- uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
157158
with:
158159
python-version: 3.x
159-
- uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # v8.1.0
160-
- uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
160+
- uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # v8.1.0
161+
- uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
161162
with:
162163
name: build-${{ matrix.version }}-epub
163164
- run: uvx epubcheck

.pre-commit-config.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,5 +40,10 @@ repos:
4040
- id: zizmor
4141
args: [--fix]
4242

43+
- repo: https://github.com/lyz-code/yamlfix/
44+
rev: f857ca370af3db7e5e181373d45c06a148fac3f8 # frozen: 1.19.1
45+
hooks:
46+
- id: yamlfix
47+
4348
ci:
4449
autoupdate_schedule: quarterly

pyproject.toml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
[tool.ruff.format]
2+
quote-style = "single"
3+
4+
[tool.yamlfix]
5+
whitelines = 1
6+
section_whitelines = 1
7+
explicit_start = false
8+
line_length = 88

ruff.toml

Lines changed: 0 additions & 2 deletions
This file was deleted.

0 commit comments

Comments
 (0)