Skip to content

Commit 9fb1b09

Browse files
committed
chore: replace yamlfix with yamlfmt
Yamlfix has an issue with parsing the root `pyproject.toml` file. Signed-off-by: JP-Ellis <[email protected]>
1 parent fd37b80 commit 9fb1b09

File tree

7 files changed

+23
-22
lines changed

7 files changed

+23
-22
lines changed

.github/workflows/build-cli.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -116,8 +116,7 @@ jobs:
116116
name: Publish CLI wheels and sdist
117117

118118
if: >-
119-
github.event_name == 'push' &&
120-
startsWith(github.event.ref, 'refs/tags/pact-python-cli/')
119+
github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags/pact-python-cli/')
121120
runs-on: ubuntu-latest
122121
environment:
123122
name: pypi

.github/workflows/build-ffi.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -117,8 +117,7 @@ jobs:
117117
name: Publish FFI wheels and sdist
118118

119119
if: >-
120-
github.event_name == 'push' &&
121-
startsWith(github.event.ref, 'refs/tags/pact-python-ffi/')
120+
github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags/pact-python-ffi/')
122121
runs-on: ubuntu-latest
123122
environment:
124123
name: pypi

.github/workflows/build.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,8 +86,7 @@ jobs:
8686
name: Publish wheels and sdist
8787

8888
if: >-
89-
github.event_name == 'push' &&
90-
startsWith(github.event.ref, 'refs/tags/pact-python/')
89+
github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags/pact-python/')
9190
runs-on: ubuntu-latest
9291
environment:
9392
name: pypi

.github/workflows/test.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,8 @@ jobs:
4848

4949
test:
5050
name: >-
51-
Test Python ${{ matrix.python-version }}
52-
on ${{ startsWith(matrix.os, 'macos-') && 'macOS' || startsWith(matrix.os, 'windows-') && 'Windows' || 'Linux' }}
51+
Test Python ${{ matrix.python-version }} on ${{ startsWith(matrix.os, 'macos-') && 'macOS' || startsWith(matrix.os,
52+
'windows-') && 'Windows' || 'Linux' }}
5353
5454
runs-on: ${{ matrix.os }}
5555

@@ -117,8 +117,8 @@ jobs:
117117

118118
example:
119119
name: >-
120-
Test Python Example ${{ matrix.python-version }}
121-
on ${{ startsWith(matrix.os, 'macos-') && 'macOS' || startsWith(matrix.os, 'windows-') && 'Windows' || 'Linux' }}
120+
Test Python Example ${{ matrix.python-version }} on ${{ startsWith(matrix.os, 'macos-') && 'macOS'
121+
|| startsWith(matrix.os, 'windows-') && 'Windows' || 'Linux' }}
122122
123123
runs-on: ${{ matrix.os }}
124124

.pre-commit-config.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,10 @@ repos:
2222
- id: mixed-line-ending
2323
- id: trailing-whitespace
2424

25-
- repo: https://github.com/lyz-code/yamlfix/
26-
rev: 1.17.0
25+
- repo: https://github.com/google/yamlfmt
26+
rev: v0.17.2
2727
hooks:
28-
- id: yamlfix
28+
- id: yamlfmt
2929

3030
- repo: https://gitlab.com/bmares/check-json5
3131
rev: v1.0.0

.yamlfmt.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
---
2+
line_ending: lf
3+
4+
formatter:
5+
include_document_start: true
6+
line_ending: lf
7+
retain_line_breaks_single: true
8+
max_line_length: 100
9+
drop_merge_tag: true
10+
pad_line_comments: 2
11+
trim_trailing_whitespace: true
12+
eof_newline: true
13+
force_array_style: block

pyproject.toml

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -382,15 +382,6 @@ exclude = """(?x)^(
382382
[tool.typos.default]
383383
extend-ignore-re = ['(?Rm)^.*(#|//|<!--)\s*spellchecker:\s*ignore']
384384

385-
################################################################################
386-
## Yamlfix
387-
################################################################################
388-
[tool.yamlfix]
389-
line_length = 100
390-
section_whitelines = 1
391-
sequence_style = "block_style"
392-
whitelines = 1
393-
394385
################################################################################
395386
## Deptry
396387
################################################################################

0 commit comments

Comments
 (0)