Merge pull request #70 from sbidoul/pre-commit-autoupdate

Pre commit autoupdate
This commit is contained in:
Stéphane Bidoul 2022-09-18 12:53:24 +02:00 committed by GitHub
commit 2f26ed9095
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 15 additions and 20 deletions

View file

@ -2,11 +2,11 @@ default_language_version:
python: python3 python: python3
repos: repos:
- repo: https://github.com/psf/black - repo: https://github.com/psf/black
rev: 22.6.0 rev: 22.8.0
hooks: hooks:
- id: black - id: black
- repo: https://github.com/myint/autoflake - repo: https://github.com/myint/autoflake
rev: v1.4 rev: v1.5.3
hooks: hooks:
- id: autoflake - id: autoflake
args: args:
@ -22,21 +22,21 @@ repos:
- id: end-of-file-fixer - id: end-of-file-fixer
- id: trailing-whitespace - id: trailing-whitespace
- repo: https://github.com/PyCQA/flake8 - repo: https://github.com/PyCQA/flake8
rev: "4.0.1" rev: "5.0.4"
hooks: hooks:
- id: flake8 - id: flake8
additional_dependencies: ["flake8-bugbear==21.4.3"] additional_dependencies: ["flake8-bugbear==22.9.11"]
- repo: https://github.com/PyCQA/isort - repo: https://github.com/PyCQA/isort
rev: 5.10.1 rev: 5.10.1
hooks: hooks:
- id: isort - id: isort
- repo: https://github.com/myint/docformatter - repo: https://github.com/myint/docformatter
rev: v1.4 rev: v1.5.0
hooks: hooks:
- id: docformatter - id: docformatter
args: ["--in-place", "--wrap-summaries=88"] args: ["--in-place", "--wrap-summaries=88"]
- repo: https://github.com/asottile/pyupgrade - repo: https://github.com/asottile/pyupgrade
rev: v2.34.0 rev: v2.38.0
hooks: hooks:
- id: pyupgrade - id: pyupgrade
args: ["--py39-plus"] args: ["--py39-plus"]

View file

@ -1,6 +1,6 @@
import asyncio import asyncio
import datetime import datetime
from typing import AsyncGenerator from collections.abc import AsyncGenerator
from ansi2html import Ansi2HTMLConverter from ansi2html import Ansi2HTMLConverter
from fastapi import APIRouter, Depends, HTTPException, Request, status from fastapi import APIRouter, Depends, HTTPException, Request, status

View file

@ -1,6 +1,7 @@
import asyncio import asyncio
import logging import logging
from typing import Any, Awaitable, Callable from collections.abc import Awaitable
from typing import Any, Callable
from . import k8s from . import k8s
from .db import BuildsDb from .db import BuildsDb

View file

@ -1,7 +1,8 @@
import logging import logging
import sqlite3 import sqlite3
from collections.abc import Iterator
from enum import Enum from enum import Enum
from typing import Any, Iterator, Protocol, cast from typing import Any, Protocol, cast
from weakref import WeakSet from weakref import WeakSet
from .github import CommitInfo from .github import CommitInfo

View file

@ -4,11 +4,12 @@ import os
import shutil import shutil
import subprocess import subprocess
import tempfile import tempfile
from collections.abc import Generator
from contextlib import contextmanager from contextlib import contextmanager
from enum import Enum from enum import Enum
from importlib import resources from importlib import resources
from pathlib import Path from pathlib import Path
from typing import Any, Callable, Generator, TypedDict, cast from typing import Any, Callable, TypedDict, cast
import urllib3 import urllib3
from jinja2 import Template from jinja2 import Template

View file

@ -1,18 +1,10 @@
import asyncio import asyncio
import functools import functools
import re import re
from collections.abc import AsyncGenerator, Awaitable, Generator, Iterator
from concurrent.futures.thread import ThreadPoolExecutor from concurrent.futures.thread import ThreadPoolExecutor
from functools import wraps from functools import wraps
from typing import ( from typing import Any, Callable, ParamSpec, TypeVar
Any,
AsyncGenerator,
Awaitable,
Callable,
Generator,
Iterator,
ParamSpec,
TypeVar,
)
_pool = ThreadPoolExecutor(max_workers=20, thread_name_prefix="sync_to_async") _pool = ThreadPoolExecutor(max_workers=20, thread_name_prefix="sync_to_async")