Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[pre-commit.ci] pre-commit autoupdate #786

Merged
merged 4 commits into from
Nov 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: 'v4.5.0'
rev: 'v5.0.0'
hooks:
- id: check-merge-conflict
- repo: https://github.com/asottile/yesqa
rev: v1.5.0
hooks:
- id: yesqa
- repo: https://github.com/PyCQA/isort
rev: '5.12.0'
rev: '5.13.2'
hooks:
- id: isort
- repo: https://github.com/psf/black
rev: '23.11.0'
rev: '24.10.0'
hooks:
- id: black
language_version: python3 # Should be a command that runs python
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: 'v4.5.0'
rev: 'v5.0.0'
hooks:
- id: end-of-file-fixer
exclude: >-
Expand Down Expand Up @@ -46,12 +46,12 @@ repos:
- id: detect-private-key
exclude: ^examples/
- repo: https://github.com/PyCQA/flake8
rev: '6.1.0'
rev: '7.1.1'
hooks:
- id: flake8
exclude: "^docs/"
- repo: https://github.com/asottile/pyupgrade
rev: 'v3.15.0'
rev: 'v3.19.0'
hooks:
- id: pyupgrade
args: ['--py36-plus']
Expand Down
18 changes: 6 additions & 12 deletions aiohttp_jinja2/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,20 +51,17 @@
@overload
def __call__(
self, func: _SimpleTemplateHandler
) -> Callable[[web.Request], Awaitable[web.StreamResponse]]:
...
) -> Callable[[web.Request], Awaitable[web.StreamResponse]]: ...

@overload
def __call__(
self, func: Callable[[_AbstractView], _TemplateReturnType]
) -> Callable[[_AbstractView], Awaitable[web.StreamResponse]]:
...
) -> Callable[[_AbstractView], Awaitable[web.StreamResponse]]: ...

@overload
def __call__(
self, func: Callable[[_T, web.Request], _TemplateReturnType]
) -> Callable[[_T, web.Request], Awaitable[web.StreamResponse]]:
...
) -> Callable[[_T, web.Request], Awaitable[web.StreamResponse]]: ...


def setup(
Expand Down Expand Up @@ -203,20 +200,17 @@
@overload
def wrapper(
func: _SimpleTemplateHandler,
) -> Callable[[web.Request], Awaitable[web.StreamResponse]]:
...
) -> Callable[[web.Request], Awaitable[web.StreamResponse]]: ...

@overload
def wrapper(
func: Callable[[_AbstractView], _TemplateReturnType]
) -> Callable[[_AbstractView], Awaitable[web.StreamResponse]]:
...
) -> Callable[[_AbstractView], Awaitable[web.StreamResponse]]: ...

@overload
def wrapper(
func: Callable[[_T, web.Request], _TemplateReturnType]
) -> Callable[[_T, web.Request], Awaitable[web.StreamResponse]]:
...
) -> Callable[[_T, web.Request], Awaitable[web.StreamResponse]]: ...

def wrapper(
func: Callable[..., _TemplateReturnType]
Expand Down
1 change: 1 addition & 0 deletions aiohttp_jinja2/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
useful context functions, see
http://jinja.pocoo.org/docs/dev/api/#jinja2.contextfunction
"""

import warnings
from typing import Dict, Optional, TypedDict, Union

Expand Down
11 changes: 11 additions & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,14 @@ include_trailing_comma=True
multi_line_output=3
force_grid_wrap=0
combine_as_imports=True

[flake8]
extend-select =
B950,
# NIC001 -- "Implicitly concatenated str literals on one line"
NIC001,
# NIC101 -- "Implicitly concatenated bytes literals on one line"
NIC101,
# TODO: don't disable D*, fix up issues instead
ignore = N801,N802,N803,NIC002,NIC102,E203,E226,E305,W504,E252,E301,E302,E501,E704,W503,W504,D1,D4
max-line-length = 88