Skip to content

Commit 3ee2252

Browse files
author
Andrew Brookins
committed
Reformat with linter
1 parent 2b1994b commit 3ee2252

File tree

1 file changed

+10
-6
lines changed

1 file changed

+10
-6
lines changed

redis_om/model/model.py

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -333,9 +333,11 @@ def __init__(
333333
sort_fields: Optional[List[str]] = None,
334334
):
335335
if not has_redisearch(model.db()):
336-
raise RedisModelError("Your Redis instance does not have either the RediSearch module "
337-
"or RedisJSON module installed. Querying requires that your Redis "
338-
"instance has one of these modules installed.")
336+
raise RedisModelError(
337+
"Your Redis instance does not have either the RediSearch module "
338+
"or RedisJSON module installed. Querying requires that your Redis "
339+
"instance has one of these modules installed."
340+
)
339341

340342
self.expressions = expressions
341343
self.model = model
@@ -959,7 +961,7 @@ class DefaultMeta:
959961
index_name: Optional[str] = None
960962
abstract: Optional[bool] = False
961963
embedded: Optional[bool] = False
962-
encoding: Optional[str] = "utf-8"
964+
encoding: str = "utf-8"
963965

964966

965967
class ModelMeta(ModelMetaclass):
@@ -1352,8 +1354,10 @@ def schema_for_type(cls, name, typ: Any, field_info: PydanticFieldInfo):
13521354
class JsonModel(RedisModel, abc.ABC):
13531355
def __init_subclass__(cls, **kwargs):
13541356
if not has_redis_json(cls.db()):
1355-
log.error("Your Redis instance does not have the RedisJson module "
1356-
"loaded. JsonModel depends on RedisJson.")
1357+
log.error(
1358+
"Your Redis instance does not have the RedisJson module "
1359+
"loaded. JsonModel depends on RedisJson."
1360+
)
13571361
# Generate the RediSearch schema once to validate fields.
13581362
cls.redisearch_schema()
13591363

0 commit comments

Comments
 (0)