Update deps, pre-commit checkers

pull/174/merge
alufers 3 weeks ago
parent d9abbb5a8d
commit 7f14109658

@ -0,0 +1,3 @@
[flake8]
max-line-length = 120
extend-ignore = E203,E501

@ -24,11 +24,11 @@ jobs:
python-version: "3.10" python-version: "3.10"
- uses: actions/setup-python@v5 - uses: actions/setup-python@v5
with: with:
python-version: "3.10" python-version: "3.12"
- name: Install poetry - name: Install poetry
uses: abatilo/actions-poetry@7b6d33e44b4f08d7021a1dee3c044e9c253d6439 uses: abatilo/actions-poetry@7b6d33e44b4f08d7021a1dee3c044e9c253d6439
with: with:
poetry-version: "1.3.2" poetry-version: "1.8.4"
- name: Install dependencies - name: Install dependencies
run: | run: |
poetry install poetry install

@ -3,7 +3,7 @@
exclude: ^(api_protobuf/.*|docs/protobuf_docs\.md|dhaul_openapi/messages/.*)$ exclude: ^(api_protobuf/.*|docs/protobuf_docs\.md|dhaul_openapi/messages/.*)$
repos: repos:
- repo: https://github.com/pre-commit/pre-commit-hooks - repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0 rev: v5.0.0
hooks: hooks:
- id: check-yaml - id: check-yaml
- id: end-of-file-fixer - id: end-of-file-fixer
@ -16,7 +16,7 @@ repos:
- id: check-merge-conflict - id: check-merge-conflict
- id: check-added-large-files - id: check-added-large-files
- repo: https://github.com/psf/black - repo: https://github.com/psf/black
rev: 23.12.1 rev: 24.10.0
hooks: hooks:
- id: black - id: black
args: [--config=pyproject.toml] args: [--config=pyproject.toml]
@ -25,7 +25,7 @@ repos:
hooks: hooks:
- id: isort - id: isort
- repo: https://github.com/pre-commit/mirrors-mypy - repo: https://github.com/pre-commit/mirrors-mypy
rev: "v1.8.0" rev: "v1.13.0"
hooks: hooks:
- id: mypy - id: mypy
- repo: https://github.com/PyCQA/docformatter - repo: https://github.com/PyCQA/docformatter
@ -36,15 +36,14 @@ repos:
- --in-place - --in-place
- --config=pyproject.toml - --config=pyproject.toml
- repo: https://github.com/PyCQA/autoflake - repo: https://github.com/PyCQA/autoflake
rev: v2.2.1 rev: v2.3.1
hooks: hooks:
- id: autoflake - id: autoflake
- repo: https://github.com/pycqa/flake8 - repo: https://github.com/pycqa/flake8
rev: 6.1.0 rev: 7.1.1
hooks: hooks:
- id: flake8 - id: flake8
entry: pflake8 entry: flake8
additional_dependencies: [pyproject-flake8]
- repo: https://github.com/netromdk/vermin - repo: https://github.com/netromdk/vermin
rev: v1.6.0 rev: v1.6.0
hooks: hooks:
@ -53,11 +52,11 @@ repos:
args: ["-t=3.9-", "--violations"] args: ["-t=3.9-", "--violations"]
# (if your target is specified in a Vermin config, you may omit the 'args' entry entirely) # (if your target is specified in a Vermin config, you may omit the 'args' entry entirely)
- repo: https://github.com/adrienverge/yamllint.git - repo: https://github.com/adrienverge/yamllint.git
rev: v1.33.0 rev: v1.35.1
hooks: hooks:
- id: yamllint - id: yamllint
- repo: https://github.com/igorshubovych/markdownlint-cli - repo: https://github.com/igorshubovych/markdownlint-cli
rev: v0.38.0 rev: v0.42.0
hooks: hooks:
- id: markdownlint-fix - id: markdownlint-fix
- id: markdownlint - id: markdownlint

@ -279,9 +279,9 @@ def main(override_args: Optional[Sequence[str]] = None):
} }
} }
if args.examples: if args.examples:
content_to_set["content"][content_type][ content_to_set["content"][content_type]["example"] = (
"example" swagger_util.limit_example_size(body_val)
] = swagger_util.limit_example_size(body_val) )
set_key_if_not_exists( set_key_if_not_exists(
swagger["paths"][path_template_to_set][method], swagger["paths"][path_template_to_set][method],
"requestBody", "requestBody",

2036
poetry.lock generated

File diff suppressed because it is too large Load Diff

@ -8,7 +8,7 @@ license = "MIT"
[tool.poetry.dependencies] [tool.poetry.dependencies]
python = "^3.10" python = "^3.10"
mitmproxy = "^10.1.1" mitmproxy = "^11.0.0"
"ruamel.yaml" = ">=0.17.32,<0.19.0" "ruamel.yaml" = ">=0.17.32,<0.19.0"
json-stream = "^2.3.2" json-stream = "^2.3.2"
msgpack = "^1.0.7" msgpack = "^1.0.7"
@ -17,16 +17,15 @@ msgpack = "^1.0.7"
[tool.poetry.group.dev.dependencies] [tool.poetry.group.dev.dependencies]
black = "^23.1.0" black = "^23.1.0"
isort = "^5.12.0" isort = "^5.12.0"
mypy = "^1.0.1" mypy = "^1.13.0"
flake8 = "^6.0.0" flake8 = "^7.1.1"
docformatter = {extras = ["tomli"], version = "^1.7.1"} docformatter = {extras = ["tomli"], version = "^1.7.1"}
flake8-pyproject = "^1.2.2"
pre-commit = "^3.1.1" pre-commit = "^3.1.1"
pytest = "^7.2.1" pytest = "^8.3.3"
pytest-asyncio = ">=0.20.3,<0.24.0" pytest-asyncio = ">=0.20.3,<0.25.0"
vermin = "^1.5.1" vermin = "^1.5.1"
openapi-spec-validator = ">=0.5.6,<0.8.0" openapi-spec-validator = ">=0.5.6,<0.8.0"
pytest-cov = "^4.0.0" pytest-cov = "^5.0.0"
[build-system] [build-system]
requires = ["poetry-core>=1.0.0"] requires = ["poetry-core>=1.0.0"]
@ -40,9 +39,7 @@ line-length = 88
target-version = ['py310'] target-version = ['py310']
[tool.flake8]
max-line-length = 120
extend-ignore = 'E203,E501'
[tool.isort] [tool.isort]
profile = "black" profile = "black"
@ -53,3 +50,6 @@ python_version = "3.10"
[tool.docformatter] [tool.docformatter]
recursive = true recursive = true
wrap-summaries = 88 wrap-summaries = 88
[tool.pytest.ini_options]
asyncio_default_fixture_loop_scope = "function"

Loading…
Cancel
Save