mirror of
https://github.com/davidhalter/django-stubs.git
synced 2025-12-18 09:56:00 +08:00
DatabaseClient: add missing class methods and reflect Django 3.2 refactor (#846)
* DatabaseClient: add missing class method `settings_to_cmd_args_env` and add missing arg to `runshell` The `DatabaseClient.runshell()` was refactored in Django 3.2 to be more standardized across the different database backends. * DatabaseClient: make `settings_dict` dict type better by specifying key/value types * tests: add missing db backend client files to `import_all_modules`
This commit is contained in:
@@ -1,5 +1,13 @@
|
||||
from typing import Any, Dict, Iterable, List, Tuple
|
||||
|
||||
from django.db.backends.base.client import BaseDatabaseClient as BaseDatabaseClient
|
||||
|
||||
class DatabaseClient(BaseDatabaseClient):
|
||||
executable_name: str = ...
|
||||
wrapper_name: str = ...
|
||||
@staticmethod
|
||||
def connect_string(settings_dict: Dict[str, Any]) -> str: ...
|
||||
@classmethod
|
||||
def settings_to_cmd_args_env(
|
||||
self, settings_dict: Dict[str, Any], parameters: Iterable[str]
|
||||
) -> Tuple[List[str], None]: ...
|
||||
|
||||
Reference in New Issue
Block a user