run black over stubs, add checking to travis

This commit is contained in:
Maxim Kurnikov
2018-12-03 18:52:44 +03:00
parent d5bc7d4ab2
commit cf6119bf9b
420 changed files with 2295 additions and 8384 deletions

View File

@@ -8,7 +8,6 @@ from django.db.models.fields import Field, SlugField
from .base import Operation
from .utils import is_referenced_by_foreign_key
class FieldOperation(Operation):
model_name: Any = ...
name: Any = ...
@@ -17,54 +16,24 @@ class FieldOperation(Operation):
def name_lower(self) -> str: ...
def is_same_model_operation(self, operation: FieldOperation) -> bool: ...
def is_same_field_operation(self, operation: AddField) -> bool: ...
def references_model(
self, name: str, app_label: Optional[str] = ...
) -> bool: ...
def references_field(
self, model_name: str, name: str, app_label: str = ...
) -> bool: ...
def reduce(
self,
operation: Operation,
in_between: List[Operation],
app_label: str = ...,
) -> bool: ...
def references_model(self, name: str, app_label: Optional[str] = ...) -> bool: ...
def references_field(self, model_name: str, name: str, app_label: str = ...) -> bool: ...
def reduce(self, operation: Operation, in_between: List[Operation], app_label: str = ...) -> bool: ...
class AddField(FieldOperation):
field: Any = ...
preserve_default: Any = ...
def __init__(
self,
model_name: str,
name: str,
field: Field,
preserve_default: bool = ...,
) -> None: ...
def deconstruct(
self
) -> Tuple[str, List[Any], Dict[str, Union[bool, Field, str]]]: ...
def __init__(self, model_name: str, name: str, field: Field, preserve_default: bool = ...) -> None: ...
def deconstruct(self) -> Tuple[str, List[Any], Dict[str, Union[bool, Field, str]]]: ...
def state_forwards(self, app_label: str, state: ProjectState) -> None: ...
def database_forwards(
self,
app_label: str,
schema_editor: DatabaseSchemaEditor,
from_state: ProjectState,
to_state: ProjectState,
self, app_label: str, schema_editor: DatabaseSchemaEditor, from_state: ProjectState, to_state: ProjectState
) -> None: ...
def database_backwards(
self,
app_label: str,
schema_editor: DatabaseSchemaEditor,
from_state: ProjectState,
to_state: ProjectState,
self, app_label: str, schema_editor: DatabaseSchemaEditor, from_state: ProjectState, to_state: ProjectState
) -> None: ...
def describe(self) -> str: ...
def reduce(
self,
operation: Operation,
in_between: List[Operation],
app_label: str = ...,
) -> bool: ...
def reduce(self, operation: Operation, in_between: List[Operation], app_label: str = ...) -> bool: ...
class RemoveField(FieldOperation):
model_name: str
@@ -73,73 +42,36 @@ class RemoveField(FieldOperation):
def deconstruct(self) -> Tuple[str, List[Any], Dict[str, str]]: ...
def state_forwards(self, app_label: str, state: ProjectState) -> None: ...
def database_forwards(
self,
app_label: str,
schema_editor: DatabaseSchemaEditor,
from_state: ProjectState,
to_state: ProjectState,
self, app_label: str, schema_editor: DatabaseSchemaEditor, from_state: ProjectState, to_state: ProjectState
) -> None: ...
def database_backwards(
self,
app_label: str,
schema_editor: DatabaseSchemaEditor,
from_state: ProjectState,
to_state: ProjectState,
self, app_label: str, schema_editor: DatabaseSchemaEditor, from_state: ProjectState, to_state: ProjectState
) -> None: ...
def describe(self) -> str: ...
class AlterField(FieldOperation):
field: Any = ...
preserve_default: Any = ...
def __init__(
self,
model_name: str,
name: str,
field: Field,
preserve_default: bool = ...,
) -> None: ...
def deconstruct(
self
) -> Tuple[str, List[Any], Dict[str, Union[SlugField, str]]]: ...
def __init__(self, model_name: str, name: str, field: Field, preserve_default: bool = ...) -> None: ...
def deconstruct(self) -> Tuple[str, List[Any], Dict[str, Union[SlugField, str]]]: ...
def state_forwards(self, app_label: str, state: ProjectState) -> None: ...
def database_forwards(
self,
app_label: str,
schema_editor: DatabaseSchemaEditor,
from_state: ProjectState,
to_state: ProjectState,
) -> None: ...
def database_backwards(
self, app_label: Any, schema_editor: Any, from_state: Any, to_state: Any
self, app_label: str, schema_editor: DatabaseSchemaEditor, from_state: ProjectState, to_state: ProjectState
) -> None: ...
def database_backwards(self, app_label: Any, schema_editor: Any, from_state: Any, to_state: Any) -> None: ...
def describe(self) -> str: ...
def reduce(
self,
operation: Operation,
in_between: List[AlterField],
app_label: str = ...,
) -> bool: ...
def reduce(self, operation: Operation, in_between: List[AlterField], app_label: str = ...) -> bool: ...
class RenameField(FieldOperation):
old_name: Any = ...
new_name: Any = ...
def __init__(
self, model_name: str, old_name: str, new_name: str
) -> None: ...
def __init__(self, model_name: str, old_name: str, new_name: str) -> None: ...
def old_name_lower(self): ...
def new_name_lower(self) -> str: ...
def deconstruct(self): ...
def state_forwards(self, app_label: Any, state: Any) -> None: ...
def database_forwards(
self, app_label: Any, schema_editor: Any, from_state: Any, to_state: Any
) -> None: ...
def database_backwards(
self, app_label: Any, schema_editor: Any, from_state: Any, to_state: Any
) -> None: ...
def database_forwards(self, app_label: Any, schema_editor: Any, from_state: Any, to_state: Any) -> None: ...
def database_backwards(self, app_label: Any, schema_editor: Any, from_state: Any, to_state: Any) -> None: ...
def describe(self): ...
def references_field(
self, model_name: str, name: str, app_label: str = ...
) -> bool: ...
def reduce(
self, operation: Operation, in_between: List[Any], app_label: str = ...
) -> bool: ...
def references_field(self, model_name: str, name: str, app_label: str = ...) -> bool: ...
def reduce(self, operation: Operation, in_between: List[Any], app_label: str = ...) -> bool: ...