Skip to content

Commit d1318e1

Browse files
committed
pre-commit/yaml - add indenting rules
1 parent 8f172fb commit d1318e1

File tree

54 files changed

+273
-278
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

54 files changed

+273
-278
lines changed

.github/ISSUE_TEMPLATE/bug_report.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ labels: [bug, unconfirmed]
55
body:
66
- type: markdown
77
attributes:
8-
value: Thank you for taking the time to report a problem.
8+
value: Thank you for taking the time to report a problem.
99

1010
- type: textarea
1111
id: description

.github/dependabot.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,4 @@ updates:
1414
groups:
1515
all:
1616
patterns:
17-
- "*"
17+
- "*"

.github/workflows/codecov.yml

Lines changed: 44 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -7,51 +7,51 @@ jobs:
77
strategy:
88
matrix:
99
os: [ubuntu-latest]
10-
python: ["3.9","3.10","3.11", "3.12", "3.13"]
10+
python: ["3.9", "3.10", "3.11", "3.12", "3.13"]
1111
env:
1212
OS: ${{ matrix.os }}
1313
PYTHON: ${{ matrix.python }}
1414
steps:
15-
- uses: actions/checkout@master
16-
- uses: pdm-project/setup-pdm@v4
17-
with:
18-
python-version: ${{ matrix.python }}
19-
allow-python-prereleases: true
20-
cache: true
21-
- name: install deps
22-
run: |
23-
pdm use -f $PYTHON
24-
pdm install -d
25-
- name: Generate coverage report (default)
26-
run: |
27-
pdm run pytest --cov=aiopenapi3/ --cov-report=xml:./coverage/reports/coverage-default.xml tests/
28-
pdm run pytest --cov=tests/ --cov-report=xml:./coverage/reports/coverage-default-tests.xml tests/
29-
- name: install optional deps
30-
run: |
31-
pdm install -G auth,socks
32-
- name: Generate coverage report (options)
33-
run: |
34-
pdm run pytest --cov=aiopenapi3/ --cov-report=xml:./coverage/reports/coverage-optional.xml tests/
35-
pdm run pytest --cov=tests/ --cov-report=xml:./coverage/reports/coverage-optional-tests.xml tests/
36-
- name: Upload coverage to Codecov (core)
37-
uses: codecov/codecov-action@v4
38-
with:
39-
token: ${{ secrets.CODECOV_TOKEN }}
40-
directory: ./coverage/reports/
41-
files: coverage-default.xml,coverage-optional.xml
42-
env_vars: OS,PYTHON
43-
fail_ci_if_error: false
44-
flags: core
45-
name: codecov-aiopenapi3
46-
verbose: true
47-
- name: Upload coverage to Codecov (tests)
48-
uses: codecov/codecov-action@v4
49-
with:
50-
token: ${{ secrets.CODECOV_TOKEN }}
51-
directory: ./coverage/reports/
52-
files: coverage-default-tests.xml,coverage-optional-tests.xml
53-
env_vars: OS,PYTHON
54-
fail_ci_if_error: false
55-
flags: tests
56-
name: codecov-aiopenapi3-tests
57-
verbose: true
15+
- uses: actions/checkout@master
16+
- uses: pdm-project/setup-pdm@v4
17+
with:
18+
python-version: ${{ matrix.python }}
19+
allow-python-prereleases: true
20+
cache: true
21+
- name: install deps
22+
run: |
23+
pdm use -f $PYTHON
24+
pdm install -d
25+
- name: Generate coverage report (default)
26+
run: |
27+
pdm run pytest --cov=aiopenapi3/ --cov-report=xml:./coverage/reports/coverage-default.xml tests/
28+
pdm run pytest --cov=tests/ --cov-report=xml:./coverage/reports/coverage-default-tests.xml tests/
29+
- name: install optional deps
30+
run: |
31+
pdm install -G auth,socks
32+
- name: Generate coverage report (options)
33+
run: |
34+
pdm run pytest --cov=aiopenapi3/ --cov-report=xml:./coverage/reports/coverage-optional.xml tests/
35+
pdm run pytest --cov=tests/ --cov-report=xml:./coverage/reports/coverage-optional-tests.xml tests/
36+
- name: Upload coverage to Codecov (core)
37+
uses: codecov/codecov-action@v4
38+
with:
39+
token: ${{ secrets.CODECOV_TOKEN }}
40+
directory: ./coverage/reports/
41+
files: coverage-default.xml,coverage-optional.xml
42+
env_vars: OS,PYTHON
43+
fail_ci_if_error: false
44+
flags: core
45+
name: codecov-aiopenapi3
46+
verbose: true
47+
- name: Upload coverage to Codecov (tests)
48+
uses: codecov/codecov-action@v4
49+
with:
50+
token: ${{ secrets.CODECOV_TOKEN }}
51+
directory: ./coverage/reports/
52+
files: coverage-default-tests.xml,coverage-optional-tests.xml
53+
env_vars: OS,PYTHON
54+
fail_ci_if_error: false
55+
flags: tests
56+
name: codecov-aiopenapi3-tests
57+
verbose: true

.github/workflows/codeql-analysis.yml

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,10 @@ name: "CodeQL"
1313

1414
on:
1515
push:
16-
branches: [ "master" ]
16+
branches: ["master"]
1717
pull_request:
1818
# The branches below must be a subset of the branches above
19-
branches: [ "master" ]
19+
branches: ["master"]
2020
schedule:
2121
- cron: '26 23 * * 6'
2222

@@ -32,19 +32,19 @@ jobs:
3232
strategy:
3333
fail-fast: false
3434
matrix:
35-
language: [ 'python' ]
35+
language: ['python']
3636
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ]
3737
# Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support
3838

3939
steps:
40-
- name: Checkout repository
41-
uses: actions/checkout@v3
40+
- name: Checkout repository
41+
uses: actions/checkout@v3
4242

4343
# Initializes the CodeQL tools for scanning.
44-
- name: Initialize CodeQL
45-
uses: github/codeql-action/init@v2
46-
with:
47-
languages: ${{ matrix.language }}
44+
- name: Initialize CodeQL
45+
uses: github/codeql-action/init@v2
46+
with:
47+
languages: ${{ matrix.language }}
4848
# If you wish to specify custom queries, you can do so here or in a config file.
4949
# By default, queries listed here will override any specified in a config file.
5050
# Prefix the list here with "+" to use these queries and those in the config file.
@@ -55,8 +55,8 @@ jobs:
5555

5656
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
5757
# If this step fails, then you should remove it and run the build manually (see below)
58-
- name: Autobuild
59-
uses: github/codeql-action/autobuild@v2
58+
- name: Autobuild
59+
uses: github/codeql-action/autobuild@v2
6060

6161
# ℹ️ Command-line programs to run using the OS shell.
6262
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
@@ -68,5 +68,5 @@ jobs:
6868
# echo "Run, Build Application using script"
6969
# ./location_of_script_within_repo/buildscript.sh
7070

71-
- name: Perform CodeQL Analysis
72-
uses: github/codeql-action/analyze@v2
71+
- name: Perform CodeQL Analysis
72+
uses: github/codeql-action/analyze@v2

.pre-commit-config.yaml

Lines changed: 16 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@ repos:
44
hooks:
55
- id: pycln
66
- repo: 'https://github.com/psf/black'
7-
rev: 24.8.0
7+
rev: 24.10.0
88
hooks:
99
- id: black
1010
args:
11-
- "--line-length=120"
11+
- "--line-length=120"
1212
- repo: 'https://github.com/pre-commit/pre-commit-hooks'
13-
rev: v4.6.0
13+
rev: v5.0.0
1414
hooks:
1515
- id: end-of-file-fixer
1616
exclude: '^docs/[^/]*\.svg$'
@@ -31,20 +31,21 @@ repos:
3131
hooks:
3232
- id: flake8
3333
args:
34-
- "--max-line-length=120"
35-
- "--ignore=E203,W503"
36-
- "--select=W504"
34+
- "--max-line-length=120"
35+
- "--ignore=E203,W503"
36+
- "--select=W504"
3737
- repo: https://github.com/asottile/pyupgrade
38-
rev: v3.17.0
38+
rev: v3.19.0
3939
hooks:
4040
- id: pyupgrade
4141
args: [--py39-plus, --keep-runtime-typing]
42+
4243
ci:
43-
autofix_commit_msg: |
44-
[pre-commit.ci] auto fixes from pre-commit.ci hooks
45-
autofix_prs: true
46-
autoupdate_branch: ''
47-
autoupdate_commit_msg: '[pre-commit.ci] pre-commit autoupdate'
48-
autoupdate_schedule: weekly
49-
skip: []
50-
submodules: false
44+
autofix_commit_msg: |
45+
[pre-commit.ci] auto fixes from pre-commit.ci hooks
46+
autofix_prs: true
47+
autoupdate_branch: ''
48+
autoupdate_commit_msg: '[pre-commit.ci] pre-commit autoupdate'
49+
autoupdate_schedule: weekly
50+
skip: []
51+
submodules: false

.readthedocs.yaml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,16 +19,16 @@ build:
1919

2020
# Build documentation in the docs/ directory with Sphinx
2121
sphinx:
22-
configuration: docs/source/conf.py
22+
configuration: docs/source/conf.py
2323

2424
# If using Sphinx, optionally build your docs in additional formats such as PDF
2525
# formats:
2626
# - pdf
2727

2828
# Optionally declare the Python requirements required to build your docs
2929
python:
30-
install:
31-
- method: pip
32-
path: .
33-
- requirements: docs/requirements.txt
34-
- requirements: requirements-tests.txt
30+
install:
31+
- method: pip
32+
path: .
33+
- requirements: docs/requirements.txt
34+
- requirements: requirements-tests.txt

docker-compose.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@ services:
55
context: .
66
dockerfile: Dockerfile
77
volumes:
8-
- .:/app
8+
- .:/app

tests/fixtures/extra-reduced.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ components:
1111
schemas:
1212
A:
1313
type: object
14-
additionalProperties: False
14+
additionalProperties: false
1515
description: Additional information provided through arbitrary metadata.
1616
allOf:
1717
- $ref: "#/components/schemas/A0"

tests/fixtures/parsing-paths-content-nested-array-ref.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,5 +41,5 @@ components:
4141
type:
4242
type: string
4343
enum:
44-
- raw
45-
- ext4
44+
- raw
45+
- ext4

tests/fixtures/parsing-paths-content-schema-object.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,4 +27,4 @@ paths:
2727
description: Checking example string
2828
content:
2929
'text/plain':
30-
example: 'Hello'
30+
example: 'Hello'

0 commit comments

Comments
 (0)