update pre-commit hooks
This commit is contained in:
parent
d5e321b792
commit
0a8735404d
7 changed files with 13 additions and 20 deletions
|
|
@ -2,12 +2,12 @@ ci:
|
||||||
autoupdate_schedule: monthly
|
autoupdate_schedule: monthly
|
||||||
repos:
|
repos:
|
||||||
- repo: https://github.com/astral-sh/ruff-pre-commit
|
- repo: https://github.com/astral-sh/ruff-pre-commit
|
||||||
rev: v0.1.13
|
rev: v0.3.5
|
||||||
hooks:
|
hooks:
|
||||||
- id: ruff
|
- id: ruff
|
||||||
- id: ruff-format
|
- id: ruff-format
|
||||||
- repo: https://github.com/pre-commit/pre-commit-hooks
|
- repo: https://github.com/pre-commit/pre-commit-hooks
|
||||||
rev: v4.5.0
|
rev: v4.6.0
|
||||||
hooks:
|
hooks:
|
||||||
- id: check-merge-conflict
|
- id: check-merge-conflict
|
||||||
- id: debug-statements
|
- id: debug-statements
|
||||||
|
|
|
||||||
|
|
@ -97,7 +97,7 @@ ignore_missing_imports = true
|
||||||
src = ["src"]
|
src = ["src"]
|
||||||
fix = true
|
fix = true
|
||||||
show-fixes = true
|
show-fixes = true
|
||||||
show-source = true
|
output-format = "full"
|
||||||
|
|
||||||
[tool.ruff.lint]
|
[tool.ruff.lint]
|
||||||
select = [
|
select = [
|
||||||
|
|
|
||||||
|
|
@ -229,15 +229,13 @@ def prepare_import(path: str) -> str:
|
||||||
@t.overload
|
@t.overload
|
||||||
def locate_app(
|
def locate_app(
|
||||||
module_name: str, app_name: str | None, raise_if_not_found: t.Literal[True] = True
|
module_name: str, app_name: str | None, raise_if_not_found: t.Literal[True] = True
|
||||||
) -> Flask:
|
) -> Flask: ...
|
||||||
...
|
|
||||||
|
|
||||||
|
|
||||||
@t.overload
|
@t.overload
|
||||||
def locate_app(
|
def locate_app(
|
||||||
module_name: str, app_name: str | None, raise_if_not_found: t.Literal[False] = ...
|
module_name: str, app_name: str | None, raise_if_not_found: t.Literal[False] = ...
|
||||||
) -> Flask | None:
|
) -> Flask | None: ...
|
||||||
...
|
|
||||||
|
|
||||||
|
|
||||||
def locate_app(
|
def locate_app(
|
||||||
|
|
|
||||||
|
|
@ -27,12 +27,10 @@ class ConfigAttribute(t.Generic[T]):
|
||||||
self.get_converter = get_converter
|
self.get_converter = get_converter
|
||||||
|
|
||||||
@t.overload
|
@t.overload
|
||||||
def __get__(self, obj: None, owner: None) -> te.Self:
|
def __get__(self, obj: None, owner: None) -> te.Self: ...
|
||||||
...
|
|
||||||
|
|
||||||
@t.overload
|
@t.overload
|
||||||
def __get__(self, obj: App, owner: type[App]) -> T:
|
def __get__(self, obj: App, owner: type[App]) -> T: ...
|
||||||
...
|
|
||||||
|
|
||||||
def __get__(self, obj: App | None, owner: type[App] | None = None) -> T | te.Self:
|
def __get__(self, obj: App | None, owner: type[App] | None = None) -> T | te.Self:
|
||||||
if obj is None:
|
if obj is None:
|
||||||
|
|
|
||||||
|
|
@ -40,6 +40,7 @@ be processed before ``dict``.
|
||||||
|
|
||||||
app.session_interface.serializer.register(TagOrderedDict, index=0)
|
app.session_interface.serializer.register(TagOrderedDict, index=0)
|
||||||
"""
|
"""
|
||||||
|
|
||||||
from __future__ import annotations
|
from __future__ import annotations
|
||||||
|
|
||||||
import typing as t
|
import typing as t
|
||||||
|
|
|
||||||
|
|
@ -176,7 +176,7 @@ def test_jsonify_aware_datetimes(tz):
|
||||||
def test_jsonify_uuid_types(app, client):
|
def test_jsonify_uuid_types(app, client):
|
||||||
"""Test jsonify with uuid.UUID types"""
|
"""Test jsonify with uuid.UUID types"""
|
||||||
|
|
||||||
test_uuid = uuid.UUID(bytes=b"\xDE\xAD\xBE\xEF" * 4)
|
test_uuid = uuid.UUID(bytes=b"\xde\xad\xbe\xef" * 4)
|
||||||
url = "/uuid_test"
|
url = "/uuid_test"
|
||||||
app.add_url_rule(url, url, lambda: flask.jsonify(x=test_uuid))
|
app.add_url_rule(url, url, lambda: flask.jsonify(x=test_uuid))
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -17,20 +17,16 @@ async def after_async(response: Response) -> Response:
|
||||||
|
|
||||||
|
|
||||||
@app.before_request
|
@app.before_request
|
||||||
def before_sync() -> None:
|
def before_sync() -> None: ...
|
||||||
...
|
|
||||||
|
|
||||||
|
|
||||||
@app.before_request
|
@app.before_request
|
||||||
async def before_async() -> None:
|
async def before_async() -> None: ...
|
||||||
...
|
|
||||||
|
|
||||||
|
|
||||||
@app.teardown_appcontext
|
@app.teardown_appcontext
|
||||||
def teardown_sync(exc: BaseException | None) -> None:
|
def teardown_sync(exc: BaseException | None) -> None: ...
|
||||||
...
|
|
||||||
|
|
||||||
|
|
||||||
@app.teardown_appcontext
|
@app.teardown_appcontext
|
||||||
async def teardown_async(exc: BaseException | None) -> None:
|
async def teardown_async(exc: BaseException | None) -> None: ...
|
||||||
...
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue