Skip to content

Commit

Permalink
Merge pull request #34 from sopherapps/dependabot/pip/black-24.3.0
Browse files Browse the repository at this point in the history
Bump black from 22.8.0 to 24.3.0
  • Loading branch information
Tinitto authored Jun 24, 2024
2 parents a715f2f + 989a002 commit a0f79e2
Show file tree
Hide file tree
Showing 15 changed files with 25 additions and 9 deletions.
1 change: 1 addition & 0 deletions pydantic_redis/_shared/model/base.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""Exposes the Base `Model` common to both async and sync APIs
"""

import typing
from typing import Dict, Tuple, Any, Type, Union, List, Optional

Expand Down
1 change: 1 addition & 0 deletions pydantic_redis/_shared/model/delete_utils.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""Exposes shared utilities for deleting records from redis
"""

from typing import Type, Union, List

from redis.client import Pipeline
Expand Down
19 changes: 11 additions & 8 deletions pydantic_redis/_shared/model/insert_utils.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""Exposes the utility functions for inserting records into redis.
"""

from datetime import datetime
from typing import Union, Optional, Any, Dict, Tuple, List, Type

Expand Down Expand Up @@ -145,15 +146,17 @@ def _serialize_tuple(
try:
field_types = tuple_fields.get(key, ())
value = [
insert_on_pipeline(
model=field_type,
_id=None,
pipeline=pipeline,
record=item,
life_span=life_span,
(
insert_on_pipeline(
model=field_type,
_id=None,
pipeline=pipeline,
record=item,
life_span=life_span,
)
if issubclass(field_type, AbstractModel)
else item
)
if issubclass(field_type, AbstractModel)
else item
for field_type, item in zip(field_types, value)
]
key = f"{NESTED_MODEL_TUPLE_FIELD_PREFIX}{key}"
Expand Down
1 change: 1 addition & 0 deletions pydantic_redis/_shared/model/select_utils.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""Exposes utilities for selecting records from redis using lua scripts.
"""

from typing import List, Any, Type, Union, Awaitable, Optional

from pydantic_redis._shared.model.prop_utils import (
Expand Down
1 change: 1 addition & 0 deletions pydantic_redis/_shared/store.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""Exposes base Store class common to both sync and async
"""

from typing import Optional, Union, Type, Dict, Any

from pydantic.fields import ModelPrivateAttr
Expand Down
1 change: 1 addition & 0 deletions pydantic_redis/_shared/utils.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""Exposes common utilities.
"""

import typing
from typing import Any, Tuple, Optional, Union, Dict, Type, List

Expand Down
1 change: 1 addition & 0 deletions pydantic_redis/asyncio/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
This module contains the `Model` class which should be inherited when
creating model's for use in the asynchronous API of pydantic-redis.
"""

from typing import Optional, List, Any, Union, Dict

from .._shared.model import AbstractModel
Expand Down
1 change: 1 addition & 0 deletions pydantic_redis/asyncio/store.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
A model must be registered with a store before it can interact with
a redis database.
"""

from typing import Dict, Type, TYPE_CHECKING

from redis import asyncio as redis
Expand Down
1 change: 1 addition & 0 deletions pydantic_redis/config.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
"""Exposes the configuration for connecting to a redis database.
"""

from typing import Optional

from pydantic import ConfigDict, BaseModel
Expand Down
1 change: 1 addition & 0 deletions pydantic_redis/syncio/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
This module contains the `Model` class which should be inherited when
creating model's for use in the synchronous API of pydantic-redis
"""

from typing import Optional, List, Any, Union, Dict

from .._shared.model import AbstractModel
Expand Down
1 change: 1 addition & 0 deletions pydantic_redis/syncio/store.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
A model must be registered with a store before it can interact with
a redis database.
"""

from typing import Dict, Type, TYPE_CHECKING

import redis
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ pytest-lazy-fixture==0.6.3
redis==4.5.4
redislite
twine==3.8.0
black==22.8.0
black==24.3.0
pre-commit
build
pytest-asyncio
Expand Down
1 change: 1 addition & 0 deletions test/test_async_pydantic_redis.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Tests for the redis orm"""

from collections import namedtuple
from typing import Dict, Any

Expand Down
1 change: 1 addition & 0 deletions test/test_benchmarks.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Tests for benchmarks"""

import pytest

from test.conftest import (
Expand Down
1 change: 1 addition & 0 deletions test/test_pydantic_redis.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Tests for the redis orm"""

from collections import namedtuple
from typing import Dict, Any, Union

Expand Down

0 comments on commit a0f79e2

Please sign in to comment.