Files
django-stubs/django/core/management/commands/inspectdb.pyi
Maxim Kurnikov a9f215bf64 initial commit
2018-07-29 18:12:23 +03:00

37 lines
1.2 KiB
Python

from collections import OrderedDict
from django.core.management.base import CommandParser
from django.db.backends.base.introspection import FieldInfo
from django.db.backends.sqlite3.base import DatabaseWrapper
from typing import (
Any,
Dict,
Iterator,
List,
Tuple,
Union,
)
class Command:
def add_arguments(self, parser: CommandParser) -> None: ...
def get_field_type(
self,
connection: DatabaseWrapper,
table_name: str,
row: FieldInfo
) -> Union[Tuple[str, OrderedDict, List[str]], Tuple[str, OrderedDict, List[Any]]]: ...
def get_meta(
self,
table_name: str,
constraints: Dict[str, Dict[str, Union[List[str], bool, str, Tuple[str, str]]]],
column_to_field_name: Dict[str, str],
is_view: bool
) -> List[str]: ...
def handle(self, **options) -> None: ...
def handle_inspection(self, options: Dict[str, Any]) -> Iterator[str]: ...
def normalize_col_name(
self,
col_name: str,
used_column_names: List[str],
is_relation: bool
) -> Union[Tuple[str, Dict[str, str], List[str]], Tuple[str, Dict[Any, Any], List[Any]]]: ...