Skip to content

Commit a0f79e2

Browse files
authored
Merge pull request #34 from sopherapps/dependabot/pip/black-24.3.0
Bump black from 22.8.0 to 24.3.0
2 parents a715f2f + 989a002 commit a0f79e2

15 files changed

+25
-9
lines changed

pydantic_redis/_shared/model/base.py

+1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
"""Exposes the Base `Model` common to both async and sync APIs
22
33
"""
4+
45
import typing
56
from typing import Dict, Tuple, Any, Type, Union, List, Optional
67

pydantic_redis/_shared/model/delete_utils.py

+1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
"""Exposes shared utilities for deleting records from redis
22
33
"""
4+
45
from typing import Type, Union, List
56

67
from redis.client import Pipeline

pydantic_redis/_shared/model/insert_utils.py

+11-8
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
"""Exposes the utility functions for inserting records into redis.
22
33
"""
4+
45
from datetime import datetime
56
from typing import Union, Optional, Any, Dict, Tuple, List, Type
67

@@ -145,15 +146,17 @@ def _serialize_tuple(
145146
try:
146147
field_types = tuple_fields.get(key, ())
147148
value = [
148-
insert_on_pipeline(
149-
model=field_type,
150-
_id=None,
151-
pipeline=pipeline,
152-
record=item,
153-
life_span=life_span,
149+
(
150+
insert_on_pipeline(
151+
model=field_type,
152+
_id=None,
153+
pipeline=pipeline,
154+
record=item,
155+
life_span=life_span,
156+
)
157+
if issubclass(field_type, AbstractModel)
158+
else item
154159
)
155-
if issubclass(field_type, AbstractModel)
156-
else item
157160
for field_type, item in zip(field_types, value)
158161
]
159162
key = f"{NESTED_MODEL_TUPLE_FIELD_PREFIX}{key}"

pydantic_redis/_shared/model/select_utils.py

+1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
"""Exposes utilities for selecting records from redis using lua scripts.
22
33
"""
4+
45
from typing import List, Any, Type, Union, Awaitable, Optional
56

67
from pydantic_redis._shared.model.prop_utils import (

pydantic_redis/_shared/store.py

+1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
"""Exposes base Store class common to both sync and async
22
33
"""
4+
45
from typing import Optional, Union, Type, Dict, Any
56

67
from pydantic.fields import ModelPrivateAttr

pydantic_redis/_shared/utils.py

+1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
"""Exposes common utilities.
22
33
"""
4+
45
import typing
56
from typing import Any, Tuple, Optional, Union, Dict, Type, List
67

pydantic_redis/asyncio/model.py

+1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
This module contains the `Model` class which should be inherited when
44
creating model's for use in the asynchronous API of pydantic-redis.
55
"""
6+
67
from typing import Optional, List, Any, Union, Dict
78

89
from .._shared.model import AbstractModel

pydantic_redis/asyncio/store.py

+1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
A model must be registered with a store before it can interact with
99
a redis database.
1010
"""
11+
1112
from typing import Dict, Type, TYPE_CHECKING
1213

1314
from redis import asyncio as redis

pydantic_redis/config.py

+1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
"""Exposes the configuration for connecting to a redis database.
22
"""
3+
34
from typing import Optional
45

56
from pydantic import ConfigDict, BaseModel

pydantic_redis/syncio/model.py

+1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
This module contains the `Model` class which should be inherited when
44
creating model's for use in the synchronous API of pydantic-redis
55
"""
6+
67
from typing import Optional, List, Any, Union, Dict
78

89
from .._shared.model import AbstractModel

pydantic_redis/syncio/store.py

+1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
A model must be registered with a store before it can interact with
99
a redis database.
1010
"""
11+
1112
from typing import Dict, Type, TYPE_CHECKING
1213

1314
import redis

requirements.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ pytest-lazy-fixture==0.6.3
77
redis==4.5.4
88
redislite
99
twine==3.8.0
10-
black==22.8.0
10+
black==24.3.0
1111
pre-commit
1212
build
1313
pytest-asyncio

test/test_async_pydantic_redis.py

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
"""Tests for the redis orm"""
2+
23
from collections import namedtuple
34
from typing import Dict, Any
45

test/test_benchmarks.py

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
"""Tests for benchmarks"""
2+
23
import pytest
34

45
from test.conftest import (

test/test_pydantic_redis.py

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
"""Tests for the redis orm"""
2+
23
from collections import namedtuple
34
from typing import Dict, Any, Union
45

0 commit comments

Comments
 (0)