@@ -333,9 +333,11 @@ def __init__(
333
333
sort_fields : Optional [List [str ]] = None ,
334
334
):
335
335
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
+ )
339
341
340
342
self .expressions = expressions
341
343
self .model = model
@@ -959,7 +961,7 @@ class DefaultMeta:
959
961
index_name : Optional [str ] = None
960
962
abstract : Optional [bool ] = False
961
963
embedded : Optional [bool ] = False
962
- encoding : Optional [ str ] = "utf-8"
964
+ encoding : str = "utf-8"
963
965
964
966
965
967
class ModelMeta (ModelMetaclass ):
@@ -1352,8 +1354,10 @@ def schema_for_type(cls, name, typ: Any, field_info: PydanticFieldInfo):
1352
1354
class JsonModel (RedisModel , abc .ABC ):
1353
1355
def __init_subclass__ (cls , ** kwargs ):
1354
1356
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
+ )
1357
1361
# Generate the RediSearch schema once to validate fields.
1358
1362
cls .redisearch_schema ()
1359
1363
0 commit comments