@@ -144,7 +144,7 @@ def get_connection(cls, connection_name: str) -> BaseDBAsyncClient:
144144
145145 @classmethod
146146 def describe_model (
147- cls , model : type [Model ], serializable : bool = True
147+ cls , model : type [Model ], serializable : bool = True
148148 ) -> dict [str , Any ]: # pragma: nocoverage
149149 """
150150 Describes the given list of models or ALL registered models.
@@ -170,7 +170,7 @@ def describe_model(
170170
171171 @classmethod
172172 def describe_models (
173- cls , models : list [type [Model ]] | None = None , serializable : bool = True
173+ cls , models : list [type [Model ]] | None = None , serializable : bool = True
174174 ) -> dict [str , dict [str , Any ]]:
175175 """
176176 Describes the given list of models or ALL registered models.
@@ -211,10 +211,10 @@ def _init_relations(cls) -> None:
211211
212212 @classmethod
213213 def init_models (
214- cls ,
215- models_paths : Iterable [ModuleType | str ],
216- app_label : str ,
217- _init_relations : bool = True ,
214+ cls ,
215+ models_paths : Iterable [ModuleType | str ],
216+ app_label : str ,
217+ _init_relations : bool = True ,
218218 ) -> None :
219219 """
220220 Early initialisation of Tortoise ORM Models.
@@ -232,10 +232,10 @@ def init_models(
232232
233233 @classmethod
234234 def init_app (
235- cls ,
236- label : str ,
237- model_paths : Iterable [ModuleType | str ],
238- _init_relations : bool = True ,
235+ cls ,
236+ label : str ,
237+ model_paths : Iterable [ModuleType | str ],
238+ _init_relations : bool = True ,
239239 ) -> dict [str , type [Model ]]:
240240 """
241241 Early initialization of Tortoise ORM Models for a single app.
@@ -260,7 +260,7 @@ def init_app(
260260
261261 @classmethod
262262 def _init_apps (
263- cls , apps_config : dict [str , dict [str , Any ]], * , validate_connections : bool = True
263+ cls , apps_config : dict [str , dict [str , Any ]], * , validate_connections : bool = True
264264 ) -> None :
265265 """Internal: Initialize Apps registry on current context."""
266266 ctx = cls ._require_context ()
@@ -295,18 +295,18 @@ def _build_initial_querysets(cls) -> None:
295295
296296 @classmethod
297297 async def init (
298- cls ,
299- config : dict [str , Any ] | TortoiseConfig | None = None ,
300- config_file : str | None = None ,
301- _create_db : bool = False ,
302- db_url : str | None = None ,
303- modules : dict [str , Iterable [str | ModuleType ]] | None = None ,
304- use_tz : bool = True ,
305- timezone : str = "UTC" ,
306- routers : list [str | type ] | None = None ,
307- table_name_generator : Callable [[type [Model ]], str ] | None = None ,
308- init_connections : bool = True ,
309- _enable_global_fallback : bool = False ,
298+ cls ,
299+ config : dict [str , Any ] | TortoiseConfig | None = None ,
300+ config_file : str | None = None ,
301+ _create_db : bool = False ,
302+ db_url : str | None = None ,
303+ modules : dict [str , Iterable [str | ModuleType ]] | None = None ,
304+ use_tz : bool = True ,
305+ timezone : str = "UTC" ,
306+ routers : list [str | type ] | None = None ,
307+ table_name_generator : Callable [[type [Model ]], str ] | None = None ,
308+ init_connections : bool = True ,
309+ _enable_global_fallback : bool = False ,
310310 ) -> TortoiseContext :
311311 """
312312 Sets up Tortoise-ORM: loads apps and models, configures database connections but does not
@@ -459,7 +459,7 @@ def star_password(connections_config) -> str:
459459 str_connection_config = str_connection_config .replace (
460460 password ,
461461 # Show one third of the password at beginning (may be better for debugging purposes)
462- f"{ password [0 : len (password ) // 3 ]} ***" ,
462+ f"{ password [0 : len (password ) // 3 ]} ***" ,
463463 )
464464 return str_connection_config
465465
0 commit comments