Skip to content

Commit

Permalink
Bump pydantic from 1.10.2 to 1.10.13 (#60)
Browse files Browse the repository at this point in the history
* Bump pydantic from 1.10.2 to 1.10.13

Bumps [pydantic](https://github.com/pydantic/pydantic) from 1.10.2 to 1.10.13.
- [Release notes](https://github.com/pydantic/pydantic/releases)
- [Changelog](https://github.com/pydantic/pydantic/blob/main/HISTORY.md)
- [Commits](pydantic/pydantic@v1.10.2...v1.10.13)

---
updated-dependencies:
- dependency-name: pydantic
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>

* Fix mypy errors

---------

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Defelo <[email protected]>
  • Loading branch information
dependabot[bot] and Defelo authored Dec 22, 2023
1 parent c96cb9f commit 2a51fcc
Show file tree
Hide file tree
Showing 5 changed files with 45 additions and 44 deletions.
4 changes: 2 additions & 2 deletions api/auth.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from typing import Any, Awaitable, Callable

from fastapi import Depends, Request
from fastapi.openapi.models import HTTPBearer
from fastapi.openapi.models import HTTPBearer, SecuritySchemeType
from fastapi.security.base import SecurityBase
from pydantic import ValidationError

Expand All @@ -18,7 +18,7 @@ def get_token(request: Request) -> str:

class HTTPAuth(SecurityBase):
def __init__(self) -> None:
self.model = HTTPBearer(scheme="bearer")
self.model = HTTPBearer(type=SecuritySchemeType.http, scheme="bearer")
self.scheme_name = self.__class__.__name__

async def __call__(self, request: Request) -> Any:
Expand Down
2 changes: 1 addition & 1 deletion api/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,4 +39,4 @@ class Settings(BaseSettings):
sentry_environment: str = "test"


settings = Settings()
settings = Settings() # type: ignore
78 changes: 39 additions & 39 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ SQLAlchemy = "^1.4.42"
aiomysql = "^0.2.0"
asyncpg = "^0.29.0"
sentry-sdk = "^1.39.1"
pydantic = "^1.10.2"
pydantic = "^1.10.13"
httpx = "^0.26.0"
starlette = "^0.19.1"
alembic = "^1.13.1"
Expand Down
3 changes: 2 additions & 1 deletion tests/test_auth.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
from unittest.mock import MagicMock

import pytest
from fastapi.openapi.models import SecuritySchemeType
from fastapi.security.base import SecurityBase
from pytest_mock import MockerFixture

Expand All @@ -21,7 +22,7 @@ async def test__httpauth_constructor(mocker: MockerFixture) -> None:

http_auth = auth.HTTPAuth()

httpbearer_patch.assert_called_once_with(scheme="bearer")
httpbearer_patch.assert_called_once_with(type=SecuritySchemeType.http, scheme="bearer")
assert http_auth.model == httpbearer_patch()
assert http_auth.scheme_name == http_auth.__class__.__name__
assert issubclass(auth.HTTPAuth, SecurityBase)
Expand Down

0 comments on commit 2a51fcc

Please sign in to comment.