Reformat with linter
This commit is contained in:
		
							parent
							
								
									2b1994b98b
								
							
						
					
					
						commit
						3ee2252539
					
				
					 1 changed files with 10 additions and 6 deletions
				
			
		| 
						 | 
					@ -333,9 +333,11 @@ class FindQuery:
 | 
				
			||||||
        sort_fields: Optional[List[str]] = None,
 | 
					        sort_fields: Optional[List[str]] = None,
 | 
				
			||||||
    ):
 | 
					    ):
 | 
				
			||||||
        if not has_redisearch(model.db()):
 | 
					        if not has_redisearch(model.db()):
 | 
				
			||||||
            raise RedisModelError("Your Redis instance does not have either the RediSearch module "
 | 
					            raise RedisModelError(
 | 
				
			||||||
                                  "or RedisJSON module installed. Querying requires that your Redis "
 | 
					                "Your Redis instance does not have either the RediSearch module "
 | 
				
			||||||
                                  "instance has one of these modules installed.")
 | 
					                "or RedisJSON module installed. Querying requires that your Redis "
 | 
				
			||||||
 | 
					                "instance has one of these modules installed."
 | 
				
			||||||
 | 
					            )
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        self.expressions = expressions
 | 
					        self.expressions = expressions
 | 
				
			||||||
        self.model = model
 | 
					        self.model = model
 | 
				
			||||||
| 
						 | 
					@ -959,7 +961,7 @@ class DefaultMeta:
 | 
				
			||||||
    index_name: Optional[str] = None
 | 
					    index_name: Optional[str] = None
 | 
				
			||||||
    abstract: Optional[bool] = False
 | 
					    abstract: Optional[bool] = False
 | 
				
			||||||
    embedded: Optional[bool] = False
 | 
					    embedded: Optional[bool] = False
 | 
				
			||||||
    encoding: Optional[str] = "utf-8"
 | 
					    encoding: str = "utf-8"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
class ModelMeta(ModelMetaclass):
 | 
					class ModelMeta(ModelMetaclass):
 | 
				
			||||||
| 
						 | 
					@ -1352,8 +1354,10 @@ class HashModel(RedisModel, abc.ABC):
 | 
				
			||||||
class JsonModel(RedisModel, abc.ABC):
 | 
					class JsonModel(RedisModel, abc.ABC):
 | 
				
			||||||
    def __init_subclass__(cls, **kwargs):
 | 
					    def __init_subclass__(cls, **kwargs):
 | 
				
			||||||
        if not has_redis_json(cls.db()):
 | 
					        if not has_redis_json(cls.db()):
 | 
				
			||||||
            log.error("Your Redis instance does not have the RedisJson module "
 | 
					            log.error(
 | 
				
			||||||
                      "loaded. JsonModel depends on RedisJson.")
 | 
					                "Your Redis instance does not have the RedisJson module "
 | 
				
			||||||
 | 
					                "loaded. JsonModel depends on RedisJson."
 | 
				
			||||||
 | 
					            )
 | 
				
			||||||
        # Generate the RediSearch schema once to validate fields.
 | 
					        # Generate the RediSearch schema once to validate fields.
 | 
				
			||||||
        cls.redisearch_schema()
 | 
					        cls.redisearch_schema()
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue