diff --git a/django-stubs/contrib/admin/options.pyi b/django-stubs/contrib/admin/options.pyi index 34d6255..b88b171 100644 --- a/django-stubs/contrib/admin/options.pyi +++ b/django-stubs/contrib/admin/options.pyi @@ -241,7 +241,7 @@ class ModelAdmin(BaseModelAdmin[_ModelT]): extra_tags: str = ..., fail_silently: bool = ..., ) -> None: ... - def save_form(self, request: Any, form: Any, change: Any): ... + def save_form(self, request: Any, form: Any, change: Any) -> Any: ... def save_model(self, request: Any, obj: _ModelT, form: Any, change: Any) -> None: ... def delete_model(self, request: HttpRequest, obj: _ModelT) -> None: ... def delete_queryset(self, request: HttpRequest, queryset: QuerySet) -> None: ... @@ -255,7 +255,7 @@ class ModelAdmin(BaseModelAdmin[_ModelT]): change: bool = ..., form_url: str = ..., obj: Optional[_ModelT] = ..., - ): ... + ) -> Any: ... def response_add( self, request: HttpRequest, obj: _ModelT, post_url_continue: Optional[str] = ... ) -> HttpResponse: ... @@ -265,7 +265,7 @@ class ModelAdmin(BaseModelAdmin[_ModelT]): # Probably FileResponse cannot come from ModelAdmin views def response_action(self, request: HttpRequest, queryset: QuerySet) -> Optional[HttpResponse]: ... def response_delete(self, request: HttpRequest, obj_display: str, obj_id: int) -> HttpResponse: ... - def render_delete_form(self, request: Any, context: Any): ... + def render_delete_form(self, request: Any, context: Any) -> Any: ... def get_inline_formsets( self, request: HttpRequest, formsets: List[Any], inline_instances: List[Any], obj: Optional[_ModelT] = ... ) -> List[Any]: ... diff --git a/django-stubs/contrib/admin/utils.pyi b/django-stubs/contrib/admin/utils.pyi index d616206..f93a274 100644 --- a/django-stubs/contrib/admin/utils.pyi +++ b/django-stubs/contrib/admin/utils.pyi @@ -45,11 +45,11 @@ class NestedObjects(Collector): def nested(self, format_callback: Callable = ...) -> List[Any]: ... def can_fast_delete(self, *args: Any, **kwargs: Any) -> bool: ... -class ModelFormatDict(TypedDict): +class _ModelFormatDict(TypedDict): verbose_name: str verbose_name_plural: str -def model_format_dict(obj: Union[Model, Type[Model], QuerySet, Options[Model]]) -> ModelFormatDict: ... +def model_format_dict(obj: Union[Model, Type[Model], QuerySet, Options[Model]]) -> _ModelFormatDict: ... def model_ngettext(obj: Union[Options, QuerySet], n: Optional[int] = ...) -> str: ... def lookup_field( name: Union[Callable, str], obj: Model, model_admin: Optional[BaseModelAdmin] = ... diff --git a/django-stubs/contrib/gis/admin/options.pyi b/django-stubs/contrib/gis/admin/options.pyi index d5c38f5..3f8d655 100644 --- a/django-stubs/contrib/gis/admin/options.pyi +++ b/django-stubs/contrib/gis/admin/options.pyi @@ -35,9 +35,9 @@ class GeoModelAdmin(ModelAdmin): debug: bool = ... widget: Any = ... @property - def media(self): ... - def formfield_for_dbfield(self, db_field: Any, request: Any, **kwargs: Any): ... - def get_map_widget(self, db_field: Any): ... + def media(self) -> Any: ... + def formfield_for_dbfield(self, db_field: Any, request: Any, **kwargs: Any) -> Any: ... + def get_map_widget(self, db_field: Any) -> Any: ... class OSMGeoAdmin(GeoModelAdmin): map_template: str = ... diff --git a/django-stubs/contrib/gis/admin/widgets.pyi b/django-stubs/contrib/gis/admin/widgets.pyi index 7e23089..4e996e7 100644 --- a/django-stubs/contrib/gis/admin/widgets.pyi +++ b/django-stubs/contrib/gis/admin/widgets.pyi @@ -7,5 +7,5 @@ geo_context: Any logger: Logger class OpenLayersWidget(Textarea): - def get_context(self, name: Any, value: Any, attrs: Any): ... - def map_options(self): ... + def get_context(self, name: Any, value: Any, attrs: Any) -> Any: ... + def map_options(self) -> Any: ... diff --git a/django-stubs/contrib/gis/db/backends/base/models.pyi b/django-stubs/contrib/gis/db/backends/base/models.pyi index b5d0d71..40eccde 100644 --- a/django-stubs/contrib/gis/db/backends/base/models.pyi +++ b/django-stubs/contrib/gis/db/backends/base/models.pyi @@ -2,32 +2,32 @@ from typing import Any class SpatialRefSysMixin: @property - def srs(self): ... + def srs(self) -> Any: ... @property - def ellipsoid(self): ... + def ellipsoid(self) -> Any: ... @property - def name(self): ... + def name(self) -> Any: ... @property - def spheroid(self): ... + def spheroid(self) -> Any: ... @property - def datum(self): ... + def datum(self) -> Any: ... @property - def projected(self): ... + def projected(self) -> Any: ... @property - def local(self): ... + def local(self) -> Any: ... @property - def geographic(self): ... + def geographic(self) -> Any: ... @property - def linear_name(self): ... + def linear_name(self) -> Any: ... @property - def linear_units(self): ... + def linear_units(self) -> Any: ... @property - def angular_name(self): ... + def angular_name(self) -> Any: ... @property - def angular_units(self): ... + def angular_units(self) -> Any: ... @property - def units(self): ... + def units(self) -> Any: ... @classmethod - def get_units(cls, wkt: Any): ... + def get_units(cls, wkt: Any) -> Any: ... @classmethod - def get_spheroid(cls, wkt: Any, string: bool = ...): ... + def get_spheroid(cls, wkt: Any, string: bool = ...) -> Any: ... diff --git a/django-stubs/contrib/gis/db/backends/base/operations.pyi b/django-stubs/contrib/gis/db/backends/base/operations.pyi index a05fb3b..015b636 100644 --- a/django-stubs/contrib/gis/db/backends/base/operations.pyi +++ b/django-stubs/contrib/gis/db/backends/base/operations.pyi @@ -18,17 +18,17 @@ class BaseSpatialOperations: from_text: bool = ... def convert_extent(self, box: Any, srid: Any) -> Any: ... def convert_extent3d(self, box: Any, srid: Any) -> Any: ... - def geo_quote_name(self, name: Any): ... + def geo_quote_name(self, name: Any) -> Any: ... def geo_db_type(self, f: Any) -> Any: ... def get_distance(self, f: Any, value: Any, lookup_type: Any) -> Any: ... - def get_geom_placeholder(self, f: Any, value: Any, compiler: Any): ... + def get_geom_placeholder(self, f: Any, value: Any, compiler: Any) -> Any: ... def check_expression_support(self, expression: Any) -> None: ... def spatial_aggregate_name(self, agg_name: Any) -> Any: ... - def spatial_function_name(self, func_name: Any): ... + def spatial_function_name(self, func_name: Any) -> Any: ... def geometry_columns(self) -> Any: ... def spatial_ref_sys(self) -> Any: ... distance_expr_for_lookup: Any = ... - def get_db_converters(self, expression: Any): ... + def get_db_converters(self, expression: Any) -> Any: ... def get_geometry_converter(self, expression: Any) -> Any: ... - def get_area_att_for_field(self, field: Any): ... - def get_distance_att_for_field(self, field: Any): ... + def get_area_att_for_field(self, field: Any) -> Any: ... + def get_distance_att_for_field(self, field: Any) -> Any: ... diff --git a/django-stubs/contrib/gis/db/backends/mysql/introspection.pyi b/django-stubs/contrib/gis/db/backends/mysql/introspection.pyi index 0eeda25..fe05ddc 100644 --- a/django-stubs/contrib/gis/db/backends/mysql/introspection.pyi +++ b/django-stubs/contrib/gis/db/backends/mysql/introspection.pyi @@ -4,5 +4,5 @@ from django.db.backends.mysql.introspection import DatabaseIntrospection as Data class MySQLIntrospection(DatabaseIntrospection): data_types_reverse: Any = ... - def get_geometry_type(self, table_name: Any, description: Any): ... - def supports_spatial_index(self, cursor: Any, table_name: Any): ... + def get_geometry_type(self, table_name: Any, description: Any) -> Any: ... + def supports_spatial_index(self, cursor: Any, table_name: Any) -> Any: ... diff --git a/django-stubs/contrib/gis/db/backends/mysql/schema.pyi b/django-stubs/contrib/gis/db/backends/mysql/schema.pyi index e831c2d..97aa99f 100644 --- a/django-stubs/contrib/gis/db/backends/mysql/schema.pyi +++ b/django-stubs/contrib/gis/db/backends/mysql/schema.pyi @@ -10,8 +10,8 @@ class MySQLGISSchemaEditor(DatabaseSchemaEditor): sql_drop_spatial_index: str = ... geometry_sql: Any = ... def __init__(self, *args: Any, **kwargs: Any) -> None: ... - def skip_default(self, field: Any): ... - def column_sql(self, model: Any, field: Any, include_default: bool = ...): ... + def skip_default(self, field: Any) -> Any: ... + def column_sql(self, model: Any, field: Any, include_default: bool = ...) -> Any: ... def create_model(self, model: Any) -> None: ... def add_field(self, model: Any, field: Any) -> None: ... def remove_field(self, model: Any, field: Any) -> None: ... diff --git a/django-stubs/contrib/gis/db/backends/oracle/introspection.pyi b/django-stubs/contrib/gis/db/backends/oracle/introspection.pyi index 3410a26..9e9107e 100644 --- a/django-stubs/contrib/gis/db/backends/oracle/introspection.pyi +++ b/django-stubs/contrib/gis/db/backends/oracle/introspection.pyi @@ -4,5 +4,5 @@ from django.db.backends.oracle.introspection import DatabaseIntrospection as Dat class OracleIntrospection(DatabaseIntrospection): @property - def data_types_reverse(self): ... - def get_geometry_type(self, table_name: Any, description: Any): ... + def data_types_reverse(self) -> Any: ... + def get_geometry_type(self, table_name: Any, description: Any) -> Any: ... diff --git a/django-stubs/contrib/gis/db/backends/oracle/models.pyi b/django-stubs/contrib/gis/db/backends/oracle/models.pyi index 03050df..060fe55 100644 --- a/django-stubs/contrib/gis/db/backends/oracle/models.pyi +++ b/django-stubs/contrib/gis/db/backends/oracle/models.pyi @@ -13,9 +13,9 @@ class OracleGeometryColumns(models.Model): db_table: str = ... managed: bool = ... @classmethod - def table_name_col(cls): ... + def table_name_col(cls) -> Any: ... @classmethod - def geom_col_name(cls): ... + def geom_col_name(cls) -> Any: ... class OracleSpatialRefSys(models.Model, SpatialRefSysMixin): cs_name: Any = ... @@ -30,4 +30,4 @@ class OracleSpatialRefSys(models.Model, SpatialRefSysMixin): db_table: str = ... managed: bool = ... @property - def wkt(self): ... + def wkt(self) -> Any: ... diff --git a/django-stubs/contrib/gis/db/backends/oracle/operations.pyi b/django-stubs/contrib/gis/db/backends/oracle/operations.pyi index 3ec1230..425a5a4 100644 --- a/django-stubs/contrib/gis/db/backends/oracle/operations.pyi +++ b/django-stubs/contrib/gis/db/backends/oracle/operations.pyi @@ -30,13 +30,13 @@ class OracleOperations(BaseSpatialOperations, DatabaseOperations): select: str = ... gis_operators: Any = ... unsupported_functions: Any = ... - def geo_quote_name(self, name: Any): ... - def geo_db_type(self, f: Any): ... - def get_distance(self, f: Any, value: Any, lookup_type: Any): ... - def get_geom_placeholder(self, f: Any, value: Any, compiler: Any): ... - def spatial_aggregate_name(self, agg_name: Any): ... - def geometry_columns(self): ... - def spatial_ref_sys(self): ... - def modify_insert_params(self, placeholder: Any, params: Any): ... - def get_geometry_converter(self, expression: Any): ... - def get_area_att_for_field(self, field: Any): ... + def geo_quote_name(self, name: Any) -> Any: ... + def geo_db_type(self, f: Any) -> Any: ... + def get_distance(self, f: Any, value: Any, lookup_type: Any) -> Any: ... + def get_geom_placeholder(self, f: Any, value: Any, compiler: Any) -> Any: ... + def spatial_aggregate_name(self, agg_name: Any) -> Any: ... + def geometry_columns(self) -> Any: ... + def spatial_ref_sys(self) -> Any: ... + def modify_insert_params(self, placeholder: Any, params: Any) -> Any: ... + def get_geometry_converter(self, expression: Any) -> Any: ... + def get_area_att_for_field(self, field: Any) -> Any: ... diff --git a/django-stubs/contrib/gis/db/backends/oracle/schema.pyi b/django-stubs/contrib/gis/db/backends/oracle/schema.pyi index d333685..aab3e8b 100644 --- a/django-stubs/contrib/gis/db/backends/oracle/schema.pyi +++ b/django-stubs/contrib/gis/db/backends/oracle/schema.pyi @@ -10,8 +10,8 @@ class OracleGISSchemaEditor(DatabaseSchemaEditor): sql_clear_geometry_field_metadata: str = ... geometry_sql: Any = ... def __init__(self, *args: Any, **kwargs: Any) -> None: ... - def geo_quote_name(self, name: Any): ... - def column_sql(self, model: Any, field: Any, include_default: bool = ...): ... + def geo_quote_name(self, name: Any) -> Any: ... + def column_sql(self, model: Any, field: Any, include_default: bool = ...) -> Any: ... def create_model(self, model: Any) -> None: ... def delete_model(self, model: Any) -> None: ... def add_field(self, model: Any, field: Any) -> None: ... diff --git a/django-stubs/contrib/gis/db/backends/postgis/adapter.pyi b/django-stubs/contrib/gis/db/backends/postgis/adapter.pyi index 5b2d0c8..df6bdc9 100644 --- a/django-stubs/contrib/gis/db/backends/postgis/adapter.pyi +++ b/django-stubs/contrib/gis/db/backends/postgis/adapter.pyi @@ -6,8 +6,8 @@ class PostGISAdapter: srid: Any = ... geography: Any = ... def __init__(self, obj: Any, geography: bool = ...) -> None: ... - def __conform__(self, proto: Any): ... + def __conform__(self, proto: Any) -> Any: ... def __eq__(self, other: Any) -> Any: ... def __hash__(self) -> Any: ... def prepare(self, conn: Any) -> None: ... - def getquoted(self): ... + def getquoted(self) -> Any: ... diff --git a/django-stubs/contrib/gis/db/backends/postgis/introspection.pyi b/django-stubs/contrib/gis/db/backends/postgis/introspection.pyi index 5288832..59c6842 100644 --- a/django-stubs/contrib/gis/db/backends/postgis/introspection.pyi +++ b/django-stubs/contrib/gis/db/backends/postgis/introspection.pyi @@ -5,5 +5,5 @@ from django.db.backends.postgresql.introspection import DatabaseIntrospection as class PostGISIntrospection(DatabaseIntrospection): postgis_oid_lookup: Any = ... ignored_tables: Any = ... - def get_field_type(self, data_type: Any, description: Any): ... - def get_geometry_type(self, table_name: Any, description: Any): ... + def get_field_type(self, data_type: Any, description: Any) -> Any: ... + def get_geometry_type(self, table_name: Any, description: Any) -> Any: ... diff --git a/django-stubs/contrib/gis/db/backends/postgis/models.pyi b/django-stubs/contrib/gis/db/backends/postgis/models.pyi index c6bdfc8..1779e64 100644 --- a/django-stubs/contrib/gis/db/backends/postgis/models.pyi +++ b/django-stubs/contrib/gis/db/backends/postgis/models.pyi @@ -17,9 +17,9 @@ class PostGISGeometryColumns(models.Model): db_table: str = ... managed: bool = ... @classmethod - def table_name_col(cls): ... + def table_name_col(cls) -> Any: ... @classmethod - def geom_col_name(cls): ... + def geom_col_name(cls) -> Any: ... class PostGISSpatialRefSys(models.Model, SpatialRefSysMixin): srid: Any = ... @@ -33,4 +33,4 @@ class PostGISSpatialRefSys(models.Model, SpatialRefSysMixin): db_table: str = ... managed: bool = ... @property - def wkt(self): ... + def wkt(self) -> Any: ... diff --git a/django-stubs/contrib/gis/db/backends/postgis/operations.pyi b/django-stubs/contrib/gis/db/backends/postgis/operations.pyi index 653595f..6f6e1f9 100644 --- a/django-stubs/contrib/gis/db/backends/postgis/operations.pyi +++ b/django-stubs/contrib/gis/db/backends/postgis/operations.pyi @@ -14,13 +14,13 @@ class PostGISOperator(SpatialOperator): def __init__( self, geography: bool = ..., raster: Union[bool, Literal["bilateral"]] = ..., **kwargs: Any ) -> None: ... - def check_raster(self, lookup: Any, template_params: Any): ... + def check_raster(self, lookup: Any, template_params: Any) -> Any: ... class ST_Polygon(Func): function: str = ... def __init__(self, expr: Any) -> None: ... @property - def output_field(self): ... + def output_field(self) -> Any: ... class PostGISOperations(BaseSpatialOperations, DatabaseOperations): name: str = ... @@ -40,23 +40,23 @@ class PostGISOperations(BaseSpatialOperations, DatabaseOperations): select: str = ... select_extent: Any = ... @property - def function_names(self): ... + def function_names(self) -> Any: ... @property - def spatial_version(self): ... - def geo_db_type(self, f: Any): ... - def get_distance(self, f: Any, dist_val: Any, lookup_type: Any): ... - def get_geom_placeholder(self, f: Any, value: Any, compiler: Any): ... - def postgis_geos_version(self): ... - def postgis_lib_version(self): ... - def postgis_proj_version(self): ... - def postgis_version(self): ... - def postgis_full_version(self): ... - def postgis_version_tuple(self): ... - def proj_version_tuple(self): ... - def spatial_aggregate_name(self, agg_name: Any): ... - def geometry_columns(self): ... - def spatial_ref_sys(self): ... - def parse_raster(self, value: Any): ... - def distance_expr_for_lookup(self, lhs: Any, rhs: Any, **kwargs: Any): ... - def get_geometry_converter(self, expression: Any): ... - def get_area_att_for_field(self, field: Any): ... + def spatial_version(self) -> Any: ... + def geo_db_type(self, f: Any) -> Any: ... + def get_distance(self, f: Any, dist_val: Any, lookup_type: Any) -> Any: ... + def get_geom_placeholder(self, f: Any, value: Any, compiler: Any) -> Any: ... + def postgis_geos_version(self) -> Any: ... + def postgis_lib_version(self) -> Any: ... + def postgis_proj_version(self) -> Any: ... + def postgis_version(self) -> Any: ... + def postgis_full_version(self) -> Any: ... + def postgis_version_tuple(self) -> Any: ... + def proj_version_tuple(self) -> Any: ... + def spatial_aggregate_name(self, agg_name: Any) -> Any: ... + def geometry_columns(self) -> Any: ... + def spatial_ref_sys(self) -> Any: ... + def parse_raster(self, value: Any) -> Any: ... + def distance_expr_for_lookup(self, lhs: Any, rhs: Any, **kwargs: Any) -> Any: ... + def get_geometry_converter(self, expression: Any) -> Any: ... + def get_area_att_for_field(self, field: Any) -> Any: ... diff --git a/django-stubs/contrib/gis/db/backends/postgis/pgraster.pyi b/django-stubs/contrib/gis/db/backends/postgis/pgraster.pyi index 9165e3f..80d80b4 100644 --- a/django-stubs/contrib/gis/db/backends/postgis/pgraster.pyi +++ b/django-stubs/contrib/gis/db/backends/postgis/pgraster.pyi @@ -1,7 +1,7 @@ from typing import Any -def pack(structure: Any, data: Any): ... -def unpack(structure: Any, data: Any): ... -def chunk(data: Any, index: Any): ... -def from_pgraster(data: Any): ... -def to_pgraster(rast: Any): ... +def pack(structure: Any, data: Any) -> Any: ... +def unpack(structure: Any, data: Any) -> Any: ... +def chunk(data: Any, index: Any) -> Any: ... +def from_pgraster(data: Any) -> Any: ... +def to_pgraster(rast: Any) -> Any: ... diff --git a/django-stubs/contrib/gis/db/backends/postgis/schema.pyi b/django-stubs/contrib/gis/db/backends/postgis/schema.pyi index 58cdb98..7946eb4 100644 --- a/django-stubs/contrib/gis/db/backends/postgis/schema.pyi +++ b/django-stubs/contrib/gis/db/backends/postgis/schema.pyi @@ -8,4 +8,4 @@ class PostGISSchemaEditor(DatabaseSchemaEditor): rast_index_wrapper: str = ... sql_alter_column_to_3d: str = ... sql_alter_column_to_2d: str = ... - def geo_quote_name(self, name: Any): ... + def geo_quote_name(self, name: Any) -> Any: ... diff --git a/django-stubs/contrib/gis/db/backends/spatialite/adapter.pyi b/django-stubs/contrib/gis/db/backends/spatialite/adapter.pyi index 8405306..9556ec0 100644 --- a/django-stubs/contrib/gis/db/backends/spatialite/adapter.pyi +++ b/django-stubs/contrib/gis/db/backends/spatialite/adapter.pyi @@ -3,4 +3,4 @@ from typing import Any from django.contrib.gis.db.backends.base.adapter import WKTAdapter as WKTAdapter class SpatiaLiteAdapter(WKTAdapter): - def __conform__(self, protocol: Any): ... + def __conform__(self, protocol: Any) -> Any: ... diff --git a/django-stubs/contrib/gis/db/backends/spatialite/base.pyi b/django-stubs/contrib/gis/db/backends/spatialite/base.pyi index 6f13c4d..22b2f8c 100644 --- a/django-stubs/contrib/gis/db/backends/spatialite/base.pyi +++ b/django-stubs/contrib/gis/db/backends/spatialite/base.pyi @@ -10,5 +10,5 @@ class DatabaseWrapper(SQLiteDatabaseWrapper): ops_class: Any = ... lib_spatialite_paths: Any = ... def __init__(self, *args: Any, **kwargs: Any) -> None: ... - def get_new_connection(self, conn_params: Any): ... + def get_new_connection(self, conn_params: Any) -> Any: ... def prepare_database(self) -> None: ... diff --git a/django-stubs/contrib/gis/db/backends/spatialite/introspection.pyi b/django-stubs/contrib/gis/db/backends/spatialite/introspection.pyi index e98c223..7ce59fb 100644 --- a/django-stubs/contrib/gis/db/backends/spatialite/introspection.pyi +++ b/django-stubs/contrib/gis/db/backends/spatialite/introspection.pyi @@ -8,5 +8,5 @@ class GeoFlexibleFieldLookupDict(FlexibleFieldLookupDict): class SpatiaLiteIntrospection(DatabaseIntrospection): data_types_reverse: Any = ... - def get_geometry_type(self, table_name: Any, description: Any): ... - def get_constraints(self, cursor: Any, table_name: Any): ... + def get_geometry_type(self, table_name: Any, description: Any) -> Any: ... + def get_constraints(self, cursor: Any, table_name: Any) -> Any: ... diff --git a/django-stubs/contrib/gis/db/backends/spatialite/models.pyi b/django-stubs/contrib/gis/db/backends/spatialite/models.pyi index 1c0eace..8a33516 100644 --- a/django-stubs/contrib/gis/db/backends/spatialite/models.pyi +++ b/django-stubs/contrib/gis/db/backends/spatialite/models.pyi @@ -16,9 +16,9 @@ class SpatialiteGeometryColumns(models.Model): db_table: str = ... managed: bool = ... @classmethod - def table_name_col(cls): ... + def table_name_col(cls) -> Any: ... @classmethod - def geom_col_name(cls): ... + def geom_col_name(cls) -> Any: ... class SpatialiteSpatialRefSys(models.Model, SpatialRefSysMixin): srid: Any = ... @@ -33,4 +33,4 @@ class SpatialiteSpatialRefSys(models.Model, SpatialRefSysMixin): db_table: str = ... managed: bool = ... @property - def wkt(self): ... + def wkt(self) -> Any: ... diff --git a/django-stubs/contrib/gis/db/backends/spatialite/operations.pyi b/django-stubs/contrib/gis/db/backends/spatialite/operations.pyi index 1c3c0bf..11a07c6 100644 --- a/django-stubs/contrib/gis/db/backends/spatialite/operations.pyi +++ b/django-stubs/contrib/gis/db/backends/spatialite/operations.pyi @@ -21,15 +21,15 @@ class SpatiaLiteOperations(BaseSpatialOperations, DatabaseOperations): @property def unsupported_functions(self) -> Set[str]: ... # type: ignore[override] @property - def spatial_version(self): ... + def spatial_version(self) -> Any: ... def geo_db_type(self, f: Any) -> None: ... - def get_distance(self, f: Any, value: Any, lookup_type: Any): ... - def geos_version(self): ... - def proj_version(self): ... - def lwgeom_version(self): ... - def spatialite_version(self): ... - def spatialite_version_tuple(self): ... - def spatial_aggregate_name(self, agg_name: Any): ... - def geometry_columns(self): ... - def spatial_ref_sys(self): ... - def get_geometry_converter(self, expression: Any): ... + def get_distance(self, f: Any, value: Any, lookup_type: Any) -> Any: ... + def geos_version(self) -> Any: ... + def proj_version(self) -> Any: ... + def lwgeom_version(self) -> Any: ... + def spatialite_version(self) -> Any: ... + def spatialite_version_tuple(self) -> Any: ... + def spatial_aggregate_name(self, agg_name: Any) -> Any: ... + def geometry_columns(self) -> Any: ... + def spatial_ref_sys(self) -> Any: ... + def get_geometry_converter(self, expression: Any) -> Any: ... diff --git a/django-stubs/contrib/gis/db/backends/spatialite/schema.pyi b/django-stubs/contrib/gis/db/backends/spatialite/schema.pyi index 361f2fb..3aea269 100644 --- a/django-stubs/contrib/gis/db/backends/spatialite/schema.pyi +++ b/django-stubs/contrib/gis/db/backends/spatialite/schema.pyi @@ -13,8 +13,8 @@ class SpatialiteSchemaEditor(DatabaseSchemaEditor): geometry_tables: Any = ... geometry_sql: Any = ... def __init__(self, *args: Any, **kwargs: Any) -> None: ... - def geo_quote_name(self, name: Any): ... - def column_sql(self, model: Any, field: Any, include_default: bool = ...): ... + def geo_quote_name(self, name: Any) -> Any: ... + def column_sql(self, model: Any, field: Any, include_default: bool = ...) -> Any: ... def remove_geometry_metadata(self, model: Any, field: Any) -> None: ... def create_model(self, model: Any) -> None: ... def delete_model(self, model: Any, **kwargs: Any) -> None: ... diff --git a/django-stubs/contrib/gis/db/backends/utils.pyi b/django-stubs/contrib/gis/db/backends/utils.pyi index 6fdd631..e7024bb 100644 --- a/django-stubs/contrib/gis/db/backends/utils.pyi +++ b/django-stubs/contrib/gis/db/backends/utils.pyi @@ -8,5 +8,5 @@ class SpatialOperator: func: Any = ... def __init__(self, op: Optional[Any] = ..., func: Optional[Any] = ...) -> None: ... @property - def default_template(self): ... + def default_template(self) -> Any: ... def as_sql(self, connection: Any, lookup: Any, template_params: Any, sql_params: Any) -> _AsSqlType: ... diff --git a/django-stubs/contrib/gis/db/models/aggregates.pyi b/django-stubs/contrib/gis/db/models/aggregates.pyi index 9c97b8c..09f37b3 100644 --- a/django-stubs/contrib/gis/db/models/aggregates.pyi +++ b/django-stubs/contrib/gis/db/models/aggregates.pyi @@ -7,11 +7,11 @@ class GeoAggregate(Aggregate): function: Any = ... is_extent: bool = ... @property - def output_field(self): ... + def output_field(self) -> Any: ... def as_sql( self, compiler: Any, connection: Any, function: Optional[Any] = ..., **extra_context: Any ) -> _AsSqlType: ... - def as_oracle(self, compiler: Any, connection: Any, **extra_context: Any): ... + def as_oracle(self, compiler: Any, connection: Any, **extra_context: Any) -> Any: ... def resolve_expression( self, query: Optional[Any] = ..., @@ -19,7 +19,7 @@ class GeoAggregate(Aggregate): reuse: Optional[Any] = ..., summarize: bool = ..., for_save: bool = ..., - ): ... + ) -> Any: ... class Collect(GeoAggregate): name: str = ... diff --git a/django-stubs/contrib/gis/db/models/fields.pyi b/django-stubs/contrib/gis/db/models/fields.pyi index 5b60ad8..8fe251d 100644 --- a/django-stubs/contrib/gis/db/models/fields.pyi +++ b/django-stubs/contrib/gis/db/models/fields.pyi @@ -44,18 +44,18 @@ class BaseSpatialField(Field[_ST, _GT]): db_tablespace: Optional[str] = ..., validators: Iterable[_ValidatorCallable] = ..., error_messages: Optional[_ErrorMessagesT] = ..., - ): ... - def deconstruct(self): ... - def db_type(self, connection: Any): ... - def spheroid(self, connection: Any): ... - def units(self, connection: Any): ... - def units_name(self, connection: Any): ... - def geodetic(self, connection: Any): ... - def get_placeholder(self, value: Any, compiler: Any, connection: Any): ... - def get_srid(self, obj: Any): ... - def get_db_prep_value(self, value: Any, connection: Any, *args: Any, **kwargs: Any): ... - def get_raster_prep_value(self, value: Any, is_candidate: Any): ... - def get_prep_value(self, value: Any): ... + ) -> None: ... + def deconstruct(self) -> Any: ... + def db_type(self, connection: Any) -> Any: ... + def spheroid(self, connection: Any) -> Any: ... + def units(self, connection: Any) -> Any: ... + def units_name(self, connection: Any) -> Any: ... + def geodetic(self, connection: Any) -> Any: ... + def get_placeholder(self, value: Any, compiler: Any, connection: Any) -> Any: ... + def get_srid(self, obj: Any) -> Any: ... + def get_db_prep_value(self, value: Any, connection: Any, *args: Any, **kwargs: Any) -> Any: ... + def get_raster_prep_value(self, value: Any, is_candidate: Any) -> Any: ... + def get_prep_value(self, value: Any) -> Any: ... class GeometryField(BaseSpatialField): description: Any = ... @@ -94,10 +94,10 @@ class GeometryField(BaseSpatialField): db_tablespace: Optional[str] = ..., validators: Iterable[_ValidatorCallable] = ..., error_messages: Optional[_ErrorMessagesT] = ..., - ): ... - def deconstruct(self): ... - def formfield(self, **kwargs: Any): ... # type: ignore[override] - def select_format(self, compiler: Any, sql: Any, params: Any): ... + ) -> None: ... + def deconstruct(self) -> Any: ... + def formfield(self, **kwargs: Any) -> Any: ... # type: ignore[override] + def select_format(self, compiler: Any, sql: Any, params: Any) -> Any: ... class PointField(GeometryField): geom_type: str = ... @@ -143,13 +143,13 @@ class GeometryCollectionField(GeometryField): class ExtentField(Field): description: Any = ... - def get_internal_type(self): ... - def select_format(self, compiler: Any, sql: Any, params: Any): ... + def get_internal_type(self) -> Any: ... + def select_format(self, compiler: Any, sql: Any, params: Any) -> Any: ... class RasterField(BaseSpatialField): description: Any = ... geom_type: str = ... geography: bool = ... - def db_type(self, connection: Any): ... - def from_db_value(self, value: Any, expression: Any, connection: Any): ... - def get_transform(self, name: Any): ... + def db_type(self, connection: Any) -> Any: ... + def from_db_value(self, value: Any, expression: Any, connection: Any) -> Any: ... + def get_transform(self, name: Any) -> Any: ... diff --git a/django-stubs/contrib/gis/db/models/functions.pyi b/django-stubs/contrib/gis/db/models/functions.pyi index 8c7217b..a9506e5 100644 --- a/django-stubs/contrib/gis/db/models/functions.pyi +++ b/django-stubs/contrib/gis/db/models/functions.pyi @@ -11,30 +11,30 @@ class GeoFuncMixin: geom_param_pos: Any = ... def __init__(self, *expressions: Any, **extra: Any) -> None: ... @property - def geo_field(self): ... + def geo_field(self) -> Any: ... def as_sql( self, compiler: Any, connection: Any, function: Optional[Any] = ..., **extra_context: Any ) -> _AsSqlType: ... - def resolve_expression(self, *args: Any, **kwargs: Any): ... + def resolve_expression(self, *args: Any, **kwargs: Any) -> Any: ... class GeoFunc(GeoFuncMixin, Func): ... class GeomOutputGeoFunc(GeoFunc): @property - def output_field(self): ... + def output_field(self) -> Any: ... class SQLiteDecimalToFloatMixin: - def as_sqlite(self, compiler: Any, connection: Any, **extra_context: Any): ... + def as_sqlite(self, compiler: Any, connection: Any, **extra_context: Any) -> Any: ... class OracleToleranceMixin: tolerance: float = ... - def as_oracle(self, compiler: Any, connection: Any, **extra_context: Any): ... + def as_oracle(self, compiler: Any, connection: Any, **extra_context: Any) -> Any: ... class Area(OracleToleranceMixin, GeoFunc): arity: int = ... @property - def output_field(self): ... - def as_sqlite(self, compiler: Any, connection: Any, **extra_context: Any): ... + def output_field(self) -> Any: ... + def as_sqlite(self, compiler: Any, connection: Any, **extra_context: Any) -> Any: ... class Azimuth(GeoFunc): output_field: Any = ... @@ -46,13 +46,13 @@ class AsGeoJSON(GeoFunc): def __init__( self, expression: Any, bbox: bool = ..., crs: bool = ..., precision: int = ..., **extra: Any ) -> None: ... - def as_oracle(self, compiler: Any, connection: Any, **extra_context: Any): ... + def as_oracle(self, compiler: Any, connection: Any, **extra_context: Any) -> Any: ... class AsGML(GeoFunc): geom_param_pos: Any = ... output_field: Any = ... def __init__(self, expression: Any, version: int = ..., precision: int = ..., **extra: Any) -> None: ... - def as_oracle(self, compiler: Any, connection: Any, **extra_context: Any): ... + def as_oracle(self, compiler: Any, connection: Any, **extra_context: Any) -> Any: ... class AsKML(GeoFunc): output_field: Any = ... @@ -72,7 +72,7 @@ class AsWKT(GeoFunc): class BoundingCircle(OracleToleranceMixin, GeomOutputGeoFunc): def __init__(self, expression: Any, num_seg: int = ..., **extra: Any) -> None: ... - def as_oracle(self, compiler: Any, connection: Any, **extra_context: Any): ... + def as_oracle(self, compiler: Any, connection: Any, **extra_context: Any) -> Any: ... class Centroid(OracleToleranceMixin, GeomOutputGeoFunc): arity: int = ... @@ -83,15 +83,15 @@ class Difference(OracleToleranceMixin, GeomOutputGeoFunc): class DistanceResultMixin: @property - def output_field(self): ... - def source_is_geography(self): ... + def output_field(self) -> Any: ... + def source_is_geography(self) -> Any: ... class Distance(DistanceResultMixin, OracleToleranceMixin, GeoFunc): geom_param_pos: Any = ... spheroid: Any = ... def __init__(self, expr1: Any, expr2: Any, spheroid: Optional[Any] = ..., **extra: Any) -> None: ... - def as_postgresql(self, compiler: Any, connection: Any, **extra_context: Any): ... - def as_sqlite(self, compiler: Any, connection: Any, **extra_context: Any): ... + def as_postgresql(self, compiler: Any, connection: Any, **extra_context: Any) -> Any: ... + def as_sqlite(self, compiler: Any, connection: Any, **extra_context: Any) -> Any: ... class Envelope(GeomOutputGeoFunc): arity: int = ... @@ -102,7 +102,7 @@ class ForcePolygonCW(GeomOutputGeoFunc): class GeoHash(GeoFunc): output_field: Any = ... def __init__(self, expression: Any, precision: Optional[Any] = ..., **extra: Any) -> None: ... - def as_mysql(self, compiler: Any, connection: Any, **extra_context: Any): ... + def as_mysql(self, compiler: Any, connection: Any, **extra_context: Any) -> Any: ... class GeometryDistance(GeoFunc): output_field: Any = ... @@ -118,13 +118,13 @@ class Intersection(OracleToleranceMixin, GeomOutputGeoFunc): class IsValid(OracleToleranceMixin, GeoFuncMixin, StandardTransform): lookup_name: str = ... output_field: Any = ... - def as_oracle(self, compiler: Any, connection: Any, **extra_context: Any): ... + def as_oracle(self, compiler: Any, connection: Any, **extra_context: Any) -> Any: ... class Length(DistanceResultMixin, OracleToleranceMixin, GeoFunc): spheroid: Any = ... def __init__(self, expr1: Any, spheroid: bool = ..., **extra: Any) -> None: ... - def as_postgresql(self, compiler: Any, connection: Any, **extra_context: Any): ... - def as_sqlite(self, compiler: Any, connection: Any, **extra_context: Any): ... + def as_postgresql(self, compiler: Any, connection: Any, **extra_context: Any) -> Any: ... + def as_sqlite(self, compiler: Any, connection: Any, **extra_context: Any) -> Any: ... class LineLocatePoint(GeoFunc): output_field: Any = ... @@ -147,8 +147,8 @@ class NumPoints(GeoFunc): class Perimeter(DistanceResultMixin, OracleToleranceMixin, GeoFunc): arity: int = ... - def as_postgresql(self, compiler: Any, connection: Any, **extra_context: Any): ... - def as_sqlite(self, compiler: Any, connection: Any, **extra_context: Any): ... + def as_postgresql(self, compiler: Any, connection: Any, **extra_context: Any) -> Any: ... + def as_sqlite(self, compiler: Any, connection: Any, **extra_context: Any) -> Any: ... class PointOnSurface(OracleToleranceMixin, GeomOutputGeoFunc): arity: int = ... @@ -170,7 +170,7 @@ class Transform(GeomOutputGeoFunc): def __init__(self, expression: Any, srid: Any, **extra: Any) -> None: ... class Translate(Scale): - def as_sqlite(self, compiler: Any, connection: Any, **extra_context: Any): ... + def as_sqlite(self, compiler: Any, connection: Any, **extra_context: Any) -> Any: ... class Union(OracleToleranceMixin, GeomOutputGeoFunc): arity: int = ... diff --git a/django-stubs/contrib/gis/db/models/lookups.pyi b/django-stubs/contrib/gis/db/models/lookups.pyi index 0e07e40..82530af 100644 --- a/django-stubs/contrib/gis/db/models/lookups.pyi +++ b/django-stubs/contrib/gis/db/models/lookups.pyi @@ -14,10 +14,10 @@ class GISLookup(Lookup): def __init__(self, lhs: Any, rhs: Any) -> None: ... def process_rhs_params(self) -> None: ... def process_band_indices(self, only_lhs: bool = ...) -> None: ... - def get_db_prep_lookup(self, value: Any, connection: Any): ... + def get_db_prep_lookup(self, value: Any, connection: Any) -> Any: ... rhs: Any = ... - def process_rhs(self, compiler: Any, connection: Any): ... - def get_rhs_op(self, connection: Any, rhs: Any): ... + def process_rhs(self, compiler: Any, connection: Any) -> Any: ... + def get_rhs_op(self, connection: Any, rhs: Any) -> Any: ... class OverlapsLeftLookup(GISLookup): lookup_name: str = ... @@ -86,7 +86,7 @@ class RelateLookup(GISLookup): lookup_name: str = ... sql_template: str = ... pattern_regex: Any = ... - def process_rhs(self, compiler: Any, connection: Any): ... + def process_rhs(self, compiler: Any, connection: Any) -> Any: ... class TouchesLookup(GISLookup): lookup_name: str = ... @@ -98,13 +98,13 @@ class DistanceLookupBase(GISLookup): distance: bool = ... sql_template: str = ... def process_rhs_params(self) -> None: ... - def process_distance(self, compiler: Any, connection: Any): ... + def process_distance(self, compiler: Any, connection: Any) -> Any: ... class DWithinLookup(DistanceLookupBase): lookup_name: str = ... sql_template: str = ... - def process_distance(self, compiler: Any, connection: Any): ... - def process_rhs(self, compiler: Any, connection: Any): ... + def process_distance(self, compiler: Any, connection: Any) -> Any: ... + def process_rhs(self, compiler: Any, connection: Any) -> Any: ... class DistanceLookupFromFunction(DistanceLookupBase): ... diff --git a/django-stubs/contrib/gis/db/models/proxy.pyi b/django-stubs/contrib/gis/db/models/proxy.pyi index c817449..8971b8d 100644 --- a/django-stubs/contrib/gis/db/models/proxy.pyi +++ b/django-stubs/contrib/gis/db/models/proxy.pyi @@ -4,5 +4,5 @@ from django.db.models.query_utils import DeferredAttribute class SpatialProxy(DeferredAttribute): def __init__(self, klass: Any, field: Any, load_func: Optional[Any] = ...) -> None: ... - def __get__(self, instance: Any, cls: Optional[Any] = ...): ... - def __set__(self, instance: Any, value: Any): ... + def __get__(self, instance: Any, cls: Optional[Any] = ...) -> Any: ... + def __set__(self, instance: Any, value: Any) -> Any: ... diff --git a/django-stubs/contrib/gis/db/models/sql/conversion.pyi b/django-stubs/contrib/gis/db/models/sql/conversion.pyi index 87b4c6c..60b54b7 100644 --- a/django-stubs/contrib/gis/db/models/sql/conversion.pyi +++ b/django-stubs/contrib/gis/db/models/sql/conversion.pyi @@ -5,15 +5,15 @@ from django.db import models as models class AreaField(models.FloatField): geo_field: Any = ... def __init__(self, geo_field: Any) -> None: ... - def get_prep_value(self, value: Any): ... - def get_db_prep_value(self, value: Any, connection: Any, prepared: bool = ...): ... - def from_db_value(self, value: Any, expression: Any, connection: Any): ... - def get_internal_type(self): ... + def get_prep_value(self, value: Any) -> Any: ... + def get_db_prep_value(self, value: Any, connection: Any, prepared: bool = ...) -> Any: ... + def from_db_value(self, value: Any, expression: Any, connection: Any) -> Any: ... + def get_internal_type(self) -> Any: ... class DistanceField(models.FloatField): geo_field: Any = ... def __init__(self, geo_field: Any) -> None: ... - def get_prep_value(self, value: Any): ... - def get_db_prep_value(self, value: Any, connection: Any, prepared: bool = ...): ... - def from_db_value(self, value: Any, expression: Any, connection: Any): ... - def get_internal_type(self): ... + def get_prep_value(self, value: Any) -> Any: ... + def get_db_prep_value(self, value: Any, connection: Any, prepared: bool = ...) -> Any: ... + def from_db_value(self, value: Any, expression: Any, connection: Any) -> Any: ... + def get_internal_type(self) -> Any: ... diff --git a/django-stubs/contrib/gis/feeds.pyi b/django-stubs/contrib/gis/feeds.pyi index 91c36ed..2e90e79 100644 --- a/django-stubs/contrib/gis/feeds.pyi +++ b/django-stubs/contrib/gis/feeds.pyi @@ -4,26 +4,26 @@ from django.contrib.syndication.views import Feed as BaseFeed from django.utils.feedgenerator import Atom1Feed, Rss201rev2Feed class GeoFeedMixin: - def georss_coords(self, coords: Any): ... + def georss_coords(self, coords: Any) -> Any: ... def add_georss_point(self, handler: Any, coords: Any, w3c_geo: bool = ...) -> None: ... def add_georss_element(self, handler: Any, item: Any, w3c_geo: bool = ...) -> None: ... class GeoRSSFeed(Rss201rev2Feed, GeoFeedMixin): - def rss_attributes(self): ... + def rss_attributes(self) -> Any: ... def add_item_elements(self, handler: Any, item: Any) -> None: ... def add_root_elements(self, handler: Any) -> None: ... class GeoAtom1Feed(Atom1Feed, GeoFeedMixin): - def root_attributes(self): ... + def root_attributes(self) -> Any: ... def add_item_elements(self, handler: Any, item: Any) -> None: ... def add_root_elements(self, handler: Any) -> None: ... class W3CGeoFeed(Rss201rev2Feed, GeoFeedMixin): - def rss_attributes(self): ... + def rss_attributes(self) -> Any: ... def add_item_elements(self, handler: Any, item: Any) -> None: ... def add_root_elements(self, handler: Any) -> None: ... class Feed(BaseFeed): feed_type: Any = ... - def feed_extra_kwargs(self, obj: Any): ... - def item_extra_kwargs(self, item: Any): ... + def feed_extra_kwargs(self, obj: Any) -> Any: ... + def item_extra_kwargs(self, item: Any) -> Any: ... diff --git a/django-stubs/contrib/gis/forms/fields.pyi b/django-stubs/contrib/gis/forms/fields.pyi index 10f668f..273fe65 100644 --- a/django-stubs/contrib/gis/forms/fields.pyi +++ b/django-stubs/contrib/gis/forms/fields.pyi @@ -8,9 +8,9 @@ class GeometryField(forms.Field): default_error_messages: Any = ... srid: Any = ... def __init__(self, *, srid: Optional[Any] = ..., geom_type: Optional[Any] = ..., **kwargs: Any) -> None: ... - def to_python(self, value: Any): ... - def clean(self, value: Any): ... - def has_changed(self, initial: Any, data: Any): ... + def to_python(self, value: Any) -> Any: ... + def clean(self, value: Any) -> Any: ... + def has_changed(self, initial: Any, data: Any) -> Any: ... class GeometryCollectionField(GeometryField): geom_type: str = ... diff --git a/django-stubs/contrib/gis/forms/widgets.pyi b/django-stubs/contrib/gis/forms/widgets.pyi index 9f9d7ba..7c09685 100644 --- a/django-stubs/contrib/gis/forms/widgets.pyi +++ b/django-stubs/contrib/gis/forms/widgets.pyi @@ -15,9 +15,9 @@ class BaseGeometryWidget(Widget): template_name: str = ... attrs: Any = ... def __init__(self, attrs: Optional[Any] = ...) -> None: ... - def serialize(self, value: Any): ... - def deserialize(self, value: Any): ... - def get_context(self, name: Any, value: Any, attrs: Any): ... + def serialize(self, value: Any) -> Any: ... + def deserialize(self, value: Any) -> Any: ... + def get_context(self, name: Any, value: Any, attrs: Any) -> Any: ... class OpenLayersWidget(BaseGeometryWidget): template_name: str = ... @@ -26,8 +26,8 @@ class OpenLayersWidget(BaseGeometryWidget): class Media: css: Any = ... js: Any = ... - def serialize(self, value: Any): ... - def deserialize(self, value: Any): ... + def serialize(self, value: Any) -> Any: ... + def deserialize(self, value: Any) -> Any: ... class OSMWidget(OpenLayersWidget): template_name: str = ... diff --git a/django-stubs/contrib/gis/gdal/datasource.pyi b/django-stubs/contrib/gis/gdal/datasource.pyi index dbbf22b..fdc52dc 100644 --- a/django-stubs/contrib/gis/gdal/datasource.pyi +++ b/django-stubs/contrib/gis/gdal/datasource.pyi @@ -8,9 +8,9 @@ class DataSource(GDALBase): ptr: Any = ... driver: Any = ... def __init__(self, ds_input: Any, ds_driver: bool = ..., write: bool = ..., encoding: str = ...) -> None: ... - def __getitem__(self, index: Any): ... - def __len__(self): ... + def __getitem__(self, index: Any) -> Any: ... + def __len__(self) -> Any: ... @property - def layer_count(self): ... + def layer_count(self) -> Any: ... @property - def name(self): ... + def name(self) -> Any: ... diff --git a/django-stubs/contrib/gis/gdal/driver.pyi b/django-stubs/contrib/gis/gdal/driver.pyi index da635d0..cddf502 100644 --- a/django-stubs/contrib/gis/gdal/driver.pyi +++ b/django-stubs/contrib/gis/gdal/driver.pyi @@ -8,6 +8,6 @@ class Driver(GDALBase): @classmethod def ensure_registered(cls) -> None: ... @classmethod - def driver_count(cls): ... + def driver_count(cls) -> Any: ... @property - def name(self): ... + def name(self) -> Any: ... diff --git a/django-stubs/contrib/gis/gdal/envelope.pyi b/django-stubs/contrib/gis/gdal/envelope.pyi index 0a8814b..965d511 100644 --- a/django-stubs/contrib/gis/gdal/envelope.pyi +++ b/django-stubs/contrib/gis/gdal/envelope.pyi @@ -6,20 +6,20 @@ class OGREnvelope(Structure): ... class Envelope: def __init__(self, *args: Any) -> None: ... def __eq__(self, other: Any) -> Any: ... - def expand_to_include(self, *args: Any): ... + def expand_to_include(self, *args: Any) -> Any: ... @property - def min_x(self): ... + def min_x(self) -> Any: ... @property - def min_y(self): ... + def min_y(self) -> Any: ... @property - def max_x(self): ... + def max_x(self) -> Any: ... @property - def max_y(self): ... + def max_y(self) -> Any: ... @property - def ur(self): ... + def ur(self) -> Any: ... @property - def ll(self): ... + def ll(self) -> Any: ... @property - def tuple(self): ... + def tuple(self) -> Any: ... @property - def wkt(self): ... + def wkt(self) -> Any: ... diff --git a/django-stubs/contrib/gis/gdal/feature.pyi b/django-stubs/contrib/gis/gdal/feature.pyi index 5fa1d2e..5d912fa 100644 --- a/django-stubs/contrib/gis/gdal/feature.pyi +++ b/django-stubs/contrib/gis/gdal/feature.pyi @@ -6,22 +6,22 @@ class Feature(GDALBase): destructor: Any = ... ptr: Any = ... def __init__(self, feat: Any, layer: Any) -> None: ... - def __getitem__(self, index: Any): ... - def __len__(self): ... + def __getitem__(self, index: Any) -> Any: ... + def __len__(self) -> Any: ... def __eq__(self, other: Any) -> Any: ... @property - def encoding(self): ... + def encoding(self) -> Any: ... @property - def fid(self): ... + def fid(self) -> Any: ... @property - def layer_name(self): ... + def layer_name(self) -> Any: ... @property - def num_fields(self): ... + def num_fields(self) -> Any: ... @property - def fields(self): ... + def fields(self) -> Any: ... @property - def geom(self): ... + def geom(self) -> Any: ... @property - def geom_type(self): ... - def get(self, field: Any): ... - def index(self, field_name: Any): ... + def geom_type(self) -> Any: ... + def get(self, field: Any) -> Any: ... + def index(self, field_name: Any) -> Any: ... diff --git a/django-stubs/contrib/gis/gdal/field.pyi b/django-stubs/contrib/gis/gdal/field.pyi index 2033a8e..28a00b9 100644 --- a/django-stubs/contrib/gis/gdal/field.pyi +++ b/django-stubs/contrib/gis/gdal/field.pyi @@ -6,34 +6,34 @@ class Field(GDALBase): ptr: Any = ... __class__: Any = ... def __init__(self, feat: Any, index: Any) -> None: ... - def as_double(self): ... - def as_int(self, is_64: bool = ...): ... - def as_string(self): ... - def as_datetime(self): ... + def as_double(self) -> Any: ... + def as_int(self, is_64: bool = ...) -> Any: ... + def as_string(self) -> Any: ... + def as_datetime(self) -> Any: ... @property - def is_set(self): ... + def is_set(self) -> Any: ... @property - def name(self): ... + def name(self) -> Any: ... @property - def precision(self): ... + def precision(self) -> Any: ... @property - def type(self): ... + def type(self) -> Any: ... @property - def type_name(self): ... + def type_name(self) -> Any: ... @property - def value(self): ... + def value(self) -> Any: ... @property - def width(self): ... + def width(self) -> Any: ... class OFTInteger(Field): @property - def value(self): ... + def value(self) -> Any: ... @property - def type(self): ... + def type(self) -> Any: ... class OFTReal(Field): @property - def value(self): ... + def value(self) -> Any: ... class OFTString(Field): ... class OFTWideString(Field): ... @@ -41,15 +41,15 @@ class OFTBinary(Field): ... class OFTDate(Field): @property - def value(self): ... + def value(self) -> Any: ... class OFTDateTime(Field): @property - def value(self): ... + def value(self) -> Any: ... class OFTTime(Field): @property - def value(self): ... + def value(self) -> Any: ... class OFTInteger64(OFTInteger): ... class OFTIntegerList(Field): ... diff --git a/django-stubs/contrib/gis/gdal/geometries.pyi b/django-stubs/contrib/gis/gdal/geometries.pyi index 15e50f8..979d810 100644 --- a/django-stubs/contrib/gis/gdal/geometries.pyi +++ b/django-stubs/contrib/gis/gdal/geometries.pyi @@ -9,127 +9,127 @@ class OGRGeometry(GDALBase): __class__: Any = ... def __init__(self, geom_input: Any, srs: Optional[Any] = ...) -> None: ... @classmethod - def from_bbox(cls, bbox: Any): ... + def from_bbox(cls, bbox: Any) -> Any: ... @staticmethod - def from_json(geom_input: Any): ... + def from_json(geom_input: Any) -> Any: ... @classmethod - def from_gml(cls, gml_string: Any): ... - def __or__(self, other: Any): ... - def __and__(self, other: Any): ... - def __sub__(self, other: Any): ... - def __xor__(self, other: Any): ... + def from_gml(cls, gml_string: Any) -> Any: ... + def __or__(self, other: Any) -> Any: ... + def __and__(self, other: Any) -> Any: ... + def __sub__(self, other: Any) -> Any: ... + def __xor__(self, other: Any) -> Any: ... def __eq__(self, other: Any) -> Any: ... @property - def dimension(self): ... + def dimension(self) -> Any: ... coord_dim: Any = ... @property - def geom_count(self): ... + def geom_count(self) -> Any: ... @property - def point_count(self): ... + def point_count(self) -> Any: ... @property - def num_points(self): ... + def num_points(self) -> Any: ... @property - def num_coords(self): ... + def num_coords(self) -> Any: ... @property - def geom_type(self): ... + def geom_type(self) -> Any: ... @property - def geom_name(self): ... + def geom_name(self) -> Any: ... @property - def area(self): ... + def area(self) -> Any: ... @property - def envelope(self): ... + def envelope(self) -> Any: ... @property - def empty(self): ... + def empty(self) -> Any: ... @property - def extent(self): ... + def extent(self) -> Any: ... srid: Any = ... @property - def geos(self): ... + def geos(self) -> Any: ... @property - def gml(self): ... + def gml(self) -> Any: ... @property - def hex(self): ... + def hex(self) -> Any: ... @property - def json(self): ... + def json(self) -> Any: ... geojson: Any = ... @property - def kml(self): ... + def kml(self) -> Any: ... @property - def wkb_size(self): ... + def wkb_size(self) -> Any: ... @property - def wkb(self): ... + def wkb(self) -> Any: ... @property - def wkt(self): ... + def wkt(self) -> Any: ... @property - def ewkt(self): ... - def clone(self): ... + def ewkt(self) -> Any: ... + def clone(self) -> Any: ... def close_rings(self) -> None: ... - def transform(self, coord_trans: Any, clone: bool = ...): ... - def intersects(self, other: Any): ... - def equals(self, other: Any): ... - def disjoint(self, other: Any): ... - def touches(self, other: Any): ... - def crosses(self, other: Any): ... - def within(self, other: Any): ... - def contains(self, other: Any): ... - def overlaps(self, other: Any): ... + def transform(self, coord_trans: Any, clone: bool = ...) -> Any: ... + def intersects(self, other: Any) -> Any: ... + def equals(self, other: Any) -> Any: ... + def disjoint(self, other: Any) -> Any: ... + def touches(self, other: Any) -> Any: ... + def crosses(self, other: Any) -> Any: ... + def within(self, other: Any) -> Any: ... + def contains(self, other: Any) -> Any: ... + def overlaps(self, other: Any) -> Any: ... @property - def boundary(self): ... + def boundary(self) -> Any: ... @property - def convex_hull(self): ... - def difference(self, other: Any): ... - def intersection(self, other: Any): ... - def sym_difference(self, other: Any): ... - def union(self, other: Any): ... + def convex_hull(self) -> Any: ... + def difference(self, other: Any) -> Any: ... + def intersection(self, other: Any) -> Any: ... + def sym_difference(self, other: Any) -> Any: ... + def union(self, other: Any) -> Any: ... class Point(OGRGeometry): @property - def x(self): ... + def x(self) -> Any: ... @property - def y(self): ... + def y(self) -> Any: ... @property - def z(self): ... + def z(self) -> Any: ... @property - def tuple(self): ... + def tuple(self) -> Any: ... coords: Any = ... class LineString(OGRGeometry): - def __getitem__(self, index: Any): ... - def __len__(self): ... + def __getitem__(self, index: Any) -> Any: ... + def __len__(self) -> Any: ... @property - def tuple(self): ... + def tuple(self) -> Any: ... coords: Any = ... @property - def x(self): ... + def x(self) -> Any: ... @property - def y(self): ... + def y(self) -> Any: ... @property - def z(self): ... + def z(self) -> Any: ... class LinearRing(LineString): ... class Polygon(OGRGeometry): - def __len__(self): ... - def __getitem__(self, index: Any): ... + def __len__(self) -> Any: ... + def __getitem__(self, index: Any) -> Any: ... @property - def shell(self): ... + def shell(self) -> Any: ... exterior_ring: Any = ... @property - def tuple(self): ... + def tuple(self) -> Any: ... coords: Any = ... @property - def point_count(self): ... + def point_count(self) -> Any: ... @property - def centroid(self): ... + def centroid(self) -> Any: ... class GeometryCollection(OGRGeometry): - def __getitem__(self, index: Any): ... - def __len__(self): ... + def __getitem__(self, index: Any) -> Any: ... + def __len__(self) -> Any: ... def add(self, geom: Any) -> None: ... @property - def point_count(self): ... + def point_count(self) -> Any: ... @property - def tuple(self): ... + def tuple(self) -> Any: ... coords: Any = ... class MultiPoint(GeometryCollection): ... diff --git a/django-stubs/contrib/gis/gdal/geomtype.pyi b/django-stubs/contrib/gis/gdal/geomtype.pyi index 5deecca..2c07979 100644 --- a/django-stubs/contrib/gis/gdal/geomtype.pyi +++ b/django-stubs/contrib/gis/gdal/geomtype.pyi @@ -6,7 +6,7 @@ class OGRGeomType: def __init__(self, type_input: Any) -> None: ... def __eq__(self, other: Any) -> Any: ... @property - def name(self): ... + def name(self) -> Any: ... @property - def django(self): ... + def django(self) -> Any: ... def to_multi(self) -> None: ... diff --git a/django-stubs/contrib/gis/gdal/layer.pyi b/django-stubs/contrib/gis/gdal/layer.pyi index 3cbc41c..d1a7cc1 100644 --- a/django-stubs/contrib/gis/gdal/layer.pyi +++ b/django-stubs/contrib/gis/gdal/layer.pyi @@ -5,28 +5,28 @@ from django.contrib.gis.gdal.base import GDALBase as GDALBase class Layer(GDALBase): ptr: Any = ... def __init__(self, layer_ptr: Any, ds: Any) -> None: ... - def __getitem__(self, index: Any): ... + def __getitem__(self, index: Any) -> Any: ... def __iter__(self) -> Any: ... - def __len__(self): ... + def __len__(self) -> Any: ... @property - def extent(self): ... + def extent(self) -> Any: ... @property - def name(self): ... + def name(self) -> Any: ... @property - def num_fields(self): ... + def num_fields(self) -> Any: ... @property - def geom_type(self): ... + def geom_type(self) -> Any: ... @property - def srs(self): ... + def srs(self) -> Any: ... @property - def fields(self): ... + def fields(self) -> Any: ... @property - def field_types(self): ... + def field_types(self) -> Any: ... @property - def field_widths(self): ... + def field_widths(self) -> Any: ... @property - def field_precisions(self): ... + def field_precisions(self) -> Any: ... spatial_filter: Any = ... - def get_fields(self, field_name: Any): ... - def get_geoms(self, geos: bool = ...): ... - def test_capability(self, capability: Any): ... + def get_fields(self, field_name: Any) -> Any: ... + def get_geoms(self, geos: bool = ...) -> Any: ... + def test_capability(self, capability: Any) -> Any: ... diff --git a/django-stubs/contrib/gis/gdal/libgdal.pyi b/django-stubs/contrib/gis/gdal/libgdal.pyi index cdf8901..a271ede 100644 --- a/django-stubs/contrib/gis/gdal/libgdal.pyi +++ b/django-stubs/contrib/gis/gdal/libgdal.pyi @@ -7,15 +7,15 @@ lib_names: Any lgdal: Any lwingdal: Any -def std_call(func: Any): ... -def gdal_version(): ... -def gdal_full_version(): ... -def gdal_version_info(): ... +def std_call(func: Any) -> Any: ... +def gdal_version() -> Any: ... +def gdal_full_version() -> Any: ... +def gdal_version_info() -> Any: ... GDAL_VERSION: Any CPLErrorHandler: Any def err_handler(error_class: Any, error_number: Any, message: Any) -> None: ... -def function(name: Any, args: Any, restype: Any): ... +def function(name: Any, args: Any, restype: Any) -> Any: ... set_error_handler: Any diff --git a/django-stubs/contrib/gis/gdal/prototypes/errcheck.pyi b/django-stubs/contrib/gis/gdal/prototypes/errcheck.pyi index 761a2a1..f00d513 100644 --- a/django-stubs/contrib/gis/gdal/prototypes/errcheck.pyi +++ b/django-stubs/contrib/gis/gdal/prototypes/errcheck.pyi @@ -1,14 +1,14 @@ from typing import Any, Optional -def arg_byref(args: Any, offset: int = ...): ... -def ptr_byref(args: Any, offset: int = ...): ... -def check_const_string(result: Any, func: Any, cargs: Any, offset: Optional[Any] = ..., cpl: bool = ...): ... -def check_string(result: Any, func: Any, cargs: Any, offset: int = ..., str_result: bool = ...): ... -def check_envelope(result: Any, func: Any, cargs: Any, offset: int = ...): ... -def check_geom(result: Any, func: Any, cargs: Any): ... -def check_geom_offset(result: Any, func: Any, cargs: Any, offset: int = ...): ... -def check_srs(result: Any, func: Any, cargs: Any): ... -def check_arg_errcode(result: Any, func: Any, cargs: Any, cpl: bool = ...): ... +def arg_byref(args: Any, offset: int = ...) -> Any: ... +def ptr_byref(args: Any, offset: int = ...) -> Any: ... +def check_const_string(result: Any, func: Any, cargs: Any, offset: Optional[Any] = ..., cpl: bool = ...) -> Any: ... +def check_string(result: Any, func: Any, cargs: Any, offset: int = ..., str_result: bool = ...) -> Any: ... +def check_envelope(result: Any, func: Any, cargs: Any, offset: int = ...) -> Any: ... +def check_geom(result: Any, func: Any, cargs: Any) -> Any: ... +def check_geom_offset(result: Any, func: Any, cargs: Any, offset: int = ...) -> Any: ... +def check_srs(result: Any, func: Any, cargs: Any) -> Any: ... +def check_arg_errcode(result: Any, func: Any, cargs: Any, cpl: bool = ...) -> Any: ... def check_errcode(result: Any, func: Any, cargs: Any, cpl: bool = ...) -> None: ... -def check_pointer(result: Any, func: Any, cargs: Any): ... -def check_str_arg(result: Any, func: Any, cargs: Any): ... +def check_pointer(result: Any, func: Any, cargs: Any) -> Any: ... +def check_str_arg(result: Any, func: Any, cargs: Any) -> Any: ... diff --git a/django-stubs/contrib/gis/gdal/prototypes/generation.pyi b/django-stubs/contrib/gis/gdal/prototypes/generation.pyi index 6f4cb3d..b55af37 100644 --- a/django-stubs/contrib/gis/gdal/prototypes/generation.pyi +++ b/django-stubs/contrib/gis/gdal/prototypes/generation.pyi @@ -3,18 +3,18 @@ from typing import Any, Optional class gdal_char_p(c_char_p): ... -def bool_output(func: Any, argtypes: Any, errcheck: Optional[Any] = ...): ... -def double_output(func: Any, argtypes: Any, errcheck: bool = ..., strarg: bool = ..., cpl: bool = ...): ... -def geom_output(func: Any, argtypes: Any, offset: Optional[Any] = ...): ... -def int_output(func: Any, argtypes: Any, errcheck: Optional[Any] = ...): ... -def int64_output(func: Any, argtypes: Any): ... -def srs_output(func: Any, argtypes: Any): ... +def bool_output(func: Any, argtypes: Any, errcheck: Optional[Any] = ...) -> Any: ... +def double_output(func: Any, argtypes: Any, errcheck: bool = ..., strarg: bool = ..., cpl: bool = ...) -> Any: ... +def geom_output(func: Any, argtypes: Any, offset: Optional[Any] = ...) -> Any: ... +def int_output(func: Any, argtypes: Any, errcheck: Optional[Any] = ...) -> Any: ... +def int64_output(func: Any, argtypes: Any) -> Any: ... +def srs_output(func: Any, argtypes: Any) -> Any: ... def const_string_output( func: Any, argtypes: Any, offset: Optional[Any] = ..., decoding: Optional[Any] = ..., cpl: bool = ... -): ... +) -> Any: ... def string_output( func: Any, argtypes: Any, offset: int = ..., str_result: bool = ..., decoding: Optional[Any] = ... -): ... -def void_output(func: Any, argtypes: Any, errcheck: bool = ..., cpl: bool = ...): ... -def voidptr_output(func: Any, argtypes: Any, errcheck: bool = ...): ... -def chararray_output(func: Any, argtypes: Any, errcheck: bool = ...): ... +) -> Any: ... +def void_output(func: Any, argtypes: Any, errcheck: bool = ..., cpl: bool = ...) -> Any: ... +def voidptr_output(func: Any, argtypes: Any, errcheck: bool = ...) -> Any: ... +def chararray_output(func: Any, argtypes: Any, errcheck: bool = ...) -> Any: ... diff --git a/django-stubs/contrib/gis/gdal/prototypes/geom.pyi b/django-stubs/contrib/gis/gdal/prototypes/geom.pyi index 562c3e9..6a10b4c 100644 --- a/django-stubs/contrib/gis/gdal/prototypes/geom.pyi +++ b/django-stubs/contrib/gis/gdal/prototypes/geom.pyi @@ -1,8 +1,8 @@ from typing import Any -def env_func(f: Any, argtypes: Any): ... -def pnt_func(f: Any): ... -def topology_func(f: Any): ... +def env_func(f: Any, argtypes: Any) -> Any: ... +def pnt_func(f: Any) -> Any: ... +def topology_func(f: Any) -> Any: ... from_json: Any to_json: Any diff --git a/django-stubs/contrib/gis/gdal/prototypes/srs.pyi b/django-stubs/contrib/gis/gdal/prototypes/srs.pyi index 2070150..7fd3f24 100644 --- a/django-stubs/contrib/gis/gdal/prototypes/srs.pyi +++ b/django-stubs/contrib/gis/gdal/prototypes/srs.pyi @@ -1,7 +1,7 @@ from typing import Any -def srs_double(f: Any): ... -def units_func(f: Any): ... +def srs_double(f: Any) -> Any: ... +def units_func(f: Any) -> Any: ... clone_srs: Any new_srs: Any diff --git a/django-stubs/contrib/gis/gdal/raster/band.pyi b/django-stubs/contrib/gis/gdal/raster/band.pyi index 2bc9a76..9d1a8f4 100644 --- a/django-stubs/contrib/gis/gdal/raster/band.pyi +++ b/django-stubs/contrib/gis/gdal/raster/band.pyi @@ -6,28 +6,28 @@ class GDALBand(GDALRasterBase): source: Any = ... def __init__(self, source: Any, index: Any) -> None: ... @property - def description(self): ... + def description(self) -> Any: ... @property - def width(self): ... + def width(self) -> Any: ... @property - def height(self): ... + def height(self) -> Any: ... @property - def pixel_count(self): ... - def statistics(self, refresh: bool = ..., approximate: bool = ...): ... + def pixel_count(self) -> Any: ... + def statistics(self, refresh: bool = ..., approximate: bool = ...) -> Any: ... @property - def min(self): ... + def min(self) -> Any: ... @property - def max(self): ... + def max(self) -> Any: ... @property - def mean(self): ... + def mean(self) -> Any: ... @property - def std(self): ... + def std(self) -> Any: ... @property - def nodata_value(self): ... + def nodata_value(self) -> Any: ... @nodata_value.setter def nodata_value(self, value: Any) -> None: ... - def datatype(self, as_string: bool = ...): ... - def color_interp(self, as_string: bool = ...): ... + def datatype(self, as_string: bool = ...) -> Any: ... + def color_interp(self, as_string: bool = ...) -> Any: ... def data( self, data: Optional[Any] = ..., @@ -35,11 +35,11 @@ class GDALBand(GDALRasterBase): size: Optional[Any] = ..., shape: Optional[Any] = ..., as_memoryview: bool = ..., - ): ... + ) -> Any: ... class BandList(list): source: Any = ... def __init__(self, source: Any) -> None: ... def __iter__(self) -> Any: ... - def __len__(self): ... - def __getitem__(self, index: Any): ... + def __len__(self) -> Any: ... + def __getitem__(self, index: Any) -> Any: ... diff --git a/django-stubs/contrib/gis/gdal/raster/base.pyi b/django-stubs/contrib/gis/gdal/raster/base.pyi index 4b3fc5c..fabfebf 100644 --- a/django-stubs/contrib/gis/gdal/raster/base.pyi +++ b/django-stubs/contrib/gis/gdal/raster/base.pyi @@ -4,6 +4,6 @@ from django.contrib.gis.gdal.base import GDALBase as GDALBase class GDALRasterBase(GDALBase): @property - def metadata(self): ... + def metadata(self) -> Any: ... @metadata.setter def metadata(self, value: Any) -> None: ... diff --git a/django-stubs/contrib/gis/gdal/raster/source.pyi b/django-stubs/contrib/gis/gdal/raster/source.pyi index ab5f5d0..c2dbbf5 100644 --- a/django-stubs/contrib/gis/gdal/raster/source.pyi +++ b/django-stubs/contrib/gis/gdal/raster/source.pyi @@ -6,11 +6,11 @@ class TransformPoint(list): indices: Any = ... def __init__(self, raster: Any, prop: Any) -> None: ... @property - def x(self): ... + def x(self) -> Any: ... @x.setter def x(self, value: Any) -> None: ... @property - def y(self): ... + def y(self) -> Any: ... @y.setter def y(self, value: Any) -> None: ... @@ -19,40 +19,40 @@ class GDALRaster(GDALRasterBase): def __init__(self, ds_input: Any, write: bool = ...) -> None: ... def __del__(self) -> None: ... @property - def vsi_buffer(self): ... + def vsi_buffer(self) -> Any: ... @property - def is_vsi_based(self): ... + def is_vsi_based(self) -> Any: ... @property - def name(self): ... + def name(self) -> Any: ... @property - def driver(self): ... + def driver(self) -> Any: ... @property - def width(self): ... + def width(self) -> Any: ... @property - def height(self): ... + def height(self) -> Any: ... @property - def srs(self): ... + def srs(self) -> Any: ... @srs.setter def srs(self, value: Any) -> None: ... @property - def srid(self): ... + def srid(self) -> Any: ... @srid.setter def srid(self, value: Any) -> None: ... @property - def geotransform(self): ... + def geotransform(self) -> Any: ... @geotransform.setter def geotransform(self, values: Any) -> None: ... @property - def origin(self): ... + def origin(self) -> Any: ... @property - def scale(self): ... + def scale(self) -> Any: ... @property - def skew(self): ... + def skew(self) -> Any: ... @property - def extent(self): ... + def extent(self) -> Any: ... @property - def bands(self): ... - def warp(self, ds_input: Any, resampling: str = ..., max_error: float = ...): ... + def bands(self) -> Any: ... + def warp(self, ds_input: Any, resampling: str = ..., max_error: float = ...) -> Any: ... def transform( self, srs: Any, @@ -60,6 +60,6 @@ class GDALRaster(GDALRasterBase): name: Optional[Any] = ..., resampling: str = ..., max_error: float = ..., - ): ... + ) -> Any: ... @property - def info(self): ... + def info(self) -> Any: ... diff --git a/django-stubs/contrib/gis/gdal/srs.pyi b/django-stubs/contrib/gis/gdal/srs.pyi index fbc4f3b..32b90be 100644 --- a/django-stubs/contrib/gis/gdal/srs.pyi +++ b/django-stubs/contrib/gis/gdal/srs.pyi @@ -12,54 +12,54 @@ class SpatialReference(GDALBase): axis_order: Any = ... ptr: Any = ... def __init__(self, srs_input: str = ..., srs_type: str = ..., axis_order: Optional[Any] = ...) -> None: ... - def __getitem__(self, target: Any): ... - def attr_value(self, target: Any, index: int = ...): ... - def auth_name(self, target: Any): ... - def auth_code(self, target: Any): ... - def clone(self): ... + def __getitem__(self, target: Any) -> Any: ... + def attr_value(self, target: Any, index: int = ...) -> Any: ... + def auth_name(self, target: Any) -> Any: ... + def auth_code(self, target: Any) -> Any: ... + def clone(self) -> Any: ... def from_esri(self) -> None: ... def identify_epsg(self) -> None: ... def to_esri(self) -> None: ... def validate(self) -> None: ... @property - def name(self): ... + def name(self) -> Any: ... @property - def srid(self): ... + def srid(self) -> Any: ... @property - def linear_name(self): ... + def linear_name(self) -> Any: ... @property - def linear_units(self): ... + def linear_units(self) -> Any: ... @property - def angular_name(self): ... + def angular_name(self) -> Any: ... @property - def angular_units(self): ... + def angular_units(self) -> Any: ... @property - def units(self): ... + def units(self) -> Any: ... @property - def ellipsoid(self): ... + def ellipsoid(self) -> Any: ... @property - def semi_major(self): ... + def semi_major(self) -> Any: ... @property - def semi_minor(self): ... + def semi_minor(self) -> Any: ... @property - def inverse_flattening(self): ... + def inverse_flattening(self) -> Any: ... @property - def geographic(self): ... + def geographic(self) -> Any: ... @property - def local(self): ... + def local(self) -> Any: ... @property - def projected(self): ... + def projected(self) -> Any: ... def import_epsg(self, epsg: Any) -> None: ... def import_proj(self, proj: Any) -> None: ... def import_user_input(self, user_input: Any) -> None: ... def import_wkt(self, wkt: Any) -> None: ... def import_xml(self, xml: Any) -> None: ... @property - def wkt(self): ... + def wkt(self) -> Any: ... @property - def proj(self): ... + def proj(self) -> Any: ... @property - def proj4(self): ... + def proj4(self) -> Any: ... class CoordTransform(GDALBase): destructor: Any = ... diff --git a/django-stubs/contrib/gis/geoip2/base.pyi b/django-stubs/contrib/gis/geoip2/base.pyi index 8c1672e..f0690f9 100644 --- a/django-stubs/contrib/gis/geoip2/base.pyi +++ b/django-stubs/contrib/gis/geoip2/base.pyi @@ -15,15 +15,15 @@ class GeoIP2: self, path: Optional[Any] = ..., cache: int = ..., country: Optional[Any] = ..., city: Optional[Any] = ... ) -> None: ... def __del__(self) -> None: ... - def city(self, query: Any): ... - def country_code(self, query: Any): ... - def country_name(self, query: Any): ... - def country(self, query: Any): ... - def coords(self, query: Any, ordering: Any = ...): ... - def lon_lat(self, query: Any): ... - def lat_lon(self, query: Any): ... - def geos(self, query: Any): ... + def city(self, query: Any) -> Any: ... + def country_code(self, query: Any) -> Any: ... + def country_name(self, query: Any) -> Any: ... + def country(self, query: Any) -> Any: ... + def coords(self, query: Any, ordering: Any = ...) -> Any: ... + def lon_lat(self, query: Any) -> Any: ... + def lat_lon(self, query: Any) -> Any: ... + def geos(self, query: Any) -> Any: ... @property - def info(self): ... + def info(self) -> Any: ... @classmethod - def open(cls, full_path: Any, cache: Any): ... + def open(cls, full_path: Any, cache: Any) -> Any: ... diff --git a/django-stubs/contrib/gis/geoip2/resources.pyi b/django-stubs/contrib/gis/geoip2/resources.pyi index 2936c61..217bfc8 100644 --- a/django-stubs/contrib/gis/geoip2/resources.pyi +++ b/django-stubs/contrib/gis/geoip2/resources.pyi @@ -1,4 +1,4 @@ from typing import Any -def City(response: Any): ... -def Country(response: Any): ... +def City(response: Any) -> Any: ... +def Country(response: Any) -> Any: ... diff --git a/django-stubs/contrib/gis/geos/collections.pyi b/django-stubs/contrib/gis/geos/collections.pyi index 8bcb045..578a23c 100644 --- a/django-stubs/contrib/gis/geos/collections.pyi +++ b/django-stubs/contrib/gis/geos/collections.pyi @@ -6,11 +6,11 @@ from django.contrib.gis.geos.geometry import LinearGeometryMixin as LinearGeomet class GeometryCollection(GEOSGeometry): def __init__(self, *args: Any, **kwargs: Any) -> None: ... def __iter__(self) -> Any: ... - def __len__(self): ... + def __len__(self) -> Any: ... @property - def kml(self): ... + def kml(self) -> Any: ... @property - def tuple(self): ... + def tuple(self) -> Any: ... coords: Any = ... class MultiPoint(GeometryCollection): ... diff --git a/django-stubs/contrib/gis/geos/coordseq.pyi b/django-stubs/contrib/gis/geos/coordseq.pyi index 69afc3d..b44d0e6 100644 --- a/django-stubs/contrib/gis/geos/coordseq.pyi +++ b/django-stubs/contrib/gis/geos/coordseq.pyi @@ -6,27 +6,27 @@ class GEOSCoordSeq(GEOSBase): ptr_type: Any = ... def __init__(self, ptr: Any, z: bool = ...) -> None: ... def __iter__(self) -> Any: ... - def __len__(self): ... - def __getitem__(self, index: Any): ... + def __len__(self) -> Any: ... + def __getitem__(self, index: Any) -> Any: ... def __setitem__(self, index: Any, value: Any) -> None: ... - def getOrdinate(self, dimension: Any, index: Any): ... + def getOrdinate(self, dimension: Any, index: Any) -> Any: ... def setOrdinate(self, dimension: Any, index: Any, value: Any) -> None: ... - def getX(self, index: Any): ... + def getX(self, index: Any) -> Any: ... def setX(self, index: Any, value: Any) -> None: ... - def getY(self, index: Any): ... + def getY(self, index: Any) -> Any: ... def setY(self, index: Any, value: Any) -> None: ... - def getZ(self, index: Any): ... + def getZ(self, index: Any) -> Any: ... def setZ(self, index: Any, value: Any) -> None: ... @property - def size(self): ... + def size(self) -> Any: ... @property - def dims(self): ... + def dims(self) -> Any: ... @property - def hasz(self): ... - def clone(self): ... + def hasz(self) -> Any: ... + def clone(self) -> Any: ... @property - def kml(self): ... + def kml(self) -> Any: ... @property - def tuple(self): ... + def tuple(self) -> Any: ... @property - def is_counterclockwise(self): ... + def is_counterclockwise(self) -> Any: ... diff --git a/django-stubs/contrib/gis/geos/factory.pyi b/django-stubs/contrib/gis/geos/factory.pyi index 99d4361..81aeee7 100644 --- a/django-stubs/contrib/gis/geos/factory.pyi +++ b/django-stubs/contrib/gis/geos/factory.pyi @@ -1,4 +1,4 @@ from typing import Any -def fromfile(file_h: Any): ... -def fromstr(string: Any, **kwargs: Any): ... +def fromfile(file_h: Any) -> Any: ... +def fromstr(string: Any, **kwargs: Any) -> Any: ... diff --git a/django-stubs/contrib/gis/geos/geometry.pyi b/django-stubs/contrib/gis/geos/geometry.pyi index a8eba03..3640c4a 100644 --- a/django-stubs/contrib/gis/geos/geometry.pyi +++ b/django-stubs/contrib/gis/geos/geometry.pyi @@ -12,127 +12,127 @@ class GEOSGeometryBase(GEOSBase): has_cs: bool = ... __class__: Any = ... def __init__(self, ptr: Any, cls: Any) -> None: ... - def __copy__(self): ... - def __deepcopy__(self, memodict: Any): ... + def __copy__(self) -> Any: ... + def __deepcopy__(self, memodict: Any) -> Any: ... @staticmethod - def from_ewkt(ewkt: Any): ... + def from_ewkt(ewkt: Any) -> Any: ... @classmethod - def from_gml(cls, gml_string: Any): ... + def from_gml(cls, gml_string: Any) -> Any: ... def __eq__(self, other: Any) -> Any: ... def __hash__(self) -> Any: ... - def __or__(self, other: Any): ... - def __and__(self, other: Any): ... - def __sub__(self, other: Any): ... - def __xor__(self, other: Any): ... + def __or__(self, other: Any) -> Any: ... + def __and__(self, other: Any) -> Any: ... + def __sub__(self, other: Any) -> Any: ... + def __xor__(self, other: Any) -> Any: ... @property - def coord_seq(self): ... + def coord_seq(self) -> Any: ... @property - def geom_type(self): ... + def geom_type(self) -> Any: ... @property - def geom_typeid(self): ... + def geom_typeid(self) -> Any: ... @property - def num_geom(self): ... + def num_geom(self) -> Any: ... @property - def num_coords(self): ... + def num_coords(self) -> Any: ... @property - def num_points(self): ... + def num_points(self) -> Any: ... @property - def dims(self): ... + def dims(self) -> Any: ... def normalize(self) -> None: ... @property - def empty(self): ... + def empty(self) -> Any: ... @property - def hasz(self): ... + def hasz(self) -> Any: ... @property - def ring(self): ... + def ring(self) -> Any: ... @property - def simple(self): ... + def simple(self) -> Any: ... @property - def valid(self): ... + def valid(self) -> Any: ... @property - def valid_reason(self): ... - def contains(self, other: Any): ... - def covers(self, other: Any): ... - def crosses(self, other: Any): ... - def disjoint(self, other: Any): ... - def equals(self, other: Any): ... - def equals_exact(self, other: Any, tolerance: float = ...): ... - def intersects(self, other: Any): ... - def overlaps(self, other: Any): ... - def relate_pattern(self, other: Any, pattern: Any): ... - def touches(self, other: Any): ... - def within(self, other: Any): ... + def valid_reason(self) -> Any: ... + def contains(self, other: Any) -> Any: ... + def covers(self, other: Any) -> Any: ... + def crosses(self, other: Any) -> Any: ... + def disjoint(self, other: Any) -> Any: ... + def equals(self, other: Any) -> Any: ... + def equals_exact(self, other: Any, tolerance: float = ...) -> Any: ... + def intersects(self, other: Any) -> Any: ... + def overlaps(self, other: Any) -> Any: ... + def relate_pattern(self, other: Any, pattern: Any) -> Any: ... + def touches(self, other: Any) -> Any: ... + def within(self, other: Any) -> Any: ... @property - def srid(self): ... + def srid(self) -> Any: ... @srid.setter def srid(self, srid: Any) -> None: ... @property - def ewkt(self): ... + def ewkt(self) -> Any: ... @property - def wkt(self): ... + def wkt(self) -> Any: ... @property - def hex(self): ... + def hex(self) -> Any: ... @property - def hexewkb(self): ... + def hexewkb(self) -> Any: ... @property - def json(self): ... + def json(self) -> Any: ... geojson: Any = ... @property - def wkb(self): ... + def wkb(self) -> Any: ... @property - def ewkb(self): ... + def ewkb(self) -> Any: ... @property - def kml(self): ... + def kml(self) -> Any: ... @property - def prepared(self): ... + def prepared(self) -> Any: ... @property - def ogr(self): ... + def ogr(self) -> Any: ... @property - def srs(self): ... + def srs(self) -> Any: ... @property - def crs(self): ... + def crs(self) -> Any: ... ptr: Any = ... - def transform(self, ct: Any, clone: bool = ...): ... + def transform(self, ct: Any, clone: bool = ...) -> Any: ... @property - def boundary(self): ... - def buffer(self, width: Any, quadsegs: int = ...): ... + def boundary(self) -> Any: ... + def buffer(self, width: Any, quadsegs: int = ...) -> Any: ... def buffer_with_style( self, width: Any, quadsegs: int = ..., end_cap_style: int = ..., join_style: int = ..., mitre_limit: float = ... - ): ... + ) -> Any: ... @property - def centroid(self): ... + def centroid(self) -> Any: ... @property - def convex_hull(self): ... - def difference(self, other: Any): ... + def convex_hull(self) -> Any: ... + def difference(self, other: Any) -> Any: ... @property - def envelope(self): ... - def intersection(self, other: Any): ... + def envelope(self) -> Any: ... + def intersection(self, other: Any) -> Any: ... @property - def point_on_surface(self): ... - def relate(self, other: Any): ... - def simplify(self, tolerance: float = ..., preserve_topology: bool = ...): ... - def sym_difference(self, other: Any): ... + def point_on_surface(self) -> Any: ... + def relate(self, other: Any) -> Any: ... + def simplify(self, tolerance: float = ..., preserve_topology: bool = ...) -> Any: ... + def sym_difference(self, other: Any) -> Any: ... @property - def unary_union(self): ... - def union(self, other: Any): ... + def unary_union(self) -> Any: ... + def union(self, other: Any) -> Any: ... @property - def area(self): ... - def distance(self, other: Any): ... + def area(self) -> Any: ... + def distance(self, other: Any) -> Any: ... @property - def extent(self): ... + def extent(self) -> Any: ... @property - def length(self): ... - def clone(self): ... + def length(self) -> Any: ... + def clone(self) -> Any: ... class LinearGeometryMixin: - def interpolate(self, distance: Any): ... - def interpolate_normalized(self, distance: Any): ... - def project(self, point: Any): ... - def project_normalized(self, point: Any): ... + def interpolate(self, distance: Any) -> Any: ... + def interpolate_normalized(self, distance: Any) -> Any: ... + def project(self, point: Any) -> Any: ... + def project_normalized(self, point: Any) -> Any: ... @property - def merged(self): ... + def merged(self) -> Any: ... @property - def closed(self): ... + def closed(self) -> Any: ... class GEOSGeometry(GEOSGeometryBase, ListMixin): srid: Any = ... diff --git a/django-stubs/contrib/gis/geos/io.pyi b/django-stubs/contrib/gis/geos/io.pyi index a2e536d..c1fed95 100644 --- a/django-stubs/contrib/gis/geos/io.pyi +++ b/django-stubs/contrib/gis/geos/io.pyi @@ -5,7 +5,7 @@ from django.contrib.gis.geos.prototypes.io import WKTWriter as WKTWriter from django.contrib.gis.geos.prototypes.io import _WKBReader, _WKTReader class WKBReader(_WKBReader): - def read(self, wkb: Any): ... + def read(self, wkb: Any) -> Any: ... class WKTReader(_WKTReader): - def read(self, wkt: Any): ... + def read(self, wkt: Any) -> Any: ... diff --git a/django-stubs/contrib/gis/geos/libgeos.pyi b/django-stubs/contrib/gis/geos/libgeos.pyi index e3947cd..857cd9f 100644 --- a/django-stubs/contrib/gis/geos/libgeos.pyi +++ b/django-stubs/contrib/gis/geos/libgeos.pyi @@ -4,7 +4,7 @@ from typing import Any, Optional logger: Logger -def load_geos(): ... +def load_geos() -> Any: ... NOTICEFUNC: Any @@ -38,9 +38,9 @@ class GEOSFuncFactory: errcheck: Optional[Any] = ..., argtypes: Optional[Any] = ... ) -> None: ... - def __call__(self, *args: Any): ... + def __call__(self, *args: Any) -> Any: ... @property - def func(self): ... + def func(self) -> Any: ... -def geos_version(): ... -def geos_version_tuple(): ... +def geos_version() -> Any: ... +def geos_version_tuple() -> Any: ... diff --git a/django-stubs/contrib/gis/geos/linestring.pyi b/django-stubs/contrib/gis/geos/linestring.pyi index b9580b7..68700c8 100644 --- a/django-stubs/contrib/gis/geos/linestring.pyi +++ b/django-stubs/contrib/gis/geos/linestring.pyi @@ -7,19 +7,19 @@ class LineString(LinearGeometryMixin, GEOSGeometry): has_cs: bool = ... def __init__(self, *args: Any, **kwargs: Any) -> None: ... def __iter__(self) -> Any: ... - def __len__(self): ... + def __len__(self) -> Any: ... @property - def tuple(self): ... + def tuple(self) -> Any: ... coords: Any = ... @property - def array(self): ... + def array(self) -> Any: ... @property - def x(self): ... + def x(self) -> Any: ... @property - def y(self): ... + def y(self) -> Any: ... @property - def z(self): ... + def z(self) -> Any: ... class LinearRing(LineString): @property - def is_counterclockwise(self): ... + def is_counterclockwise(self) -> Any: ... diff --git a/django-stubs/contrib/gis/geos/mutable_list.pyi b/django-stubs/contrib/gis/geos/mutable_list.pyi index 8bbac61..f5c3ed8 100644 --- a/django-stubs/contrib/gis/geos/mutable_list.pyi +++ b/django-stubs/contrib/gis/geos/mutable_list.pyi @@ -2,23 +2,23 @@ from typing import Any, Optional class ListMixin: def __init__(self, *args: Any, **kwargs: Any) -> None: ... - def __getitem__(self, index: Any): ... + def __getitem__(self, index: Any) -> Any: ... def __delitem__(self, index: Any) -> None: ... def __setitem__(self, index: Any, val: Any) -> None: ... - def __add__(self, other: Any): ... - def __radd__(self, other: Any): ... - def __iadd__(self, other: Any): ... - def __mul__(self, n: Any): ... - def __rmul__(self, n: Any): ... - def __imul__(self, n: Any): ... + def __add__(self, other: Any) -> Any: ... + def __radd__(self, other: Any) -> Any: ... + def __iadd__(self, other: Any) -> Any: ... + def __mul__(self, n: Any) -> Any: ... + def __rmul__(self, n: Any) -> Any: ... + def __imul__(self, n: Any) -> Any: ... def __eq__(self, other: Any) -> Any: ... def __lt__(self, other: Any) -> Any: ... - def count(self, val: Any): ... - def index(self, val: Any): ... + def count(self, val: Any) -> Any: ... + def index(self, val: Any) -> Any: ... def append(self, val: Any) -> None: ... def extend(self, vals: Any) -> None: ... def insert(self, index: Any, val: Any) -> None: ... - def pop(self, index: int = ...): ... + def pop(self, index: int = ...) -> Any: ... def remove(self, val: Any) -> None: ... def reverse(self) -> None: ... def sort(self, key: Optional[Any] = ..., reverse: bool = ...) -> None: ... diff --git a/django-stubs/contrib/gis/geos/point.pyi b/django-stubs/contrib/gis/geos/point.pyi index 1880a6d..34af47a 100644 --- a/django-stubs/contrib/gis/geos/point.pyi +++ b/django-stubs/contrib/gis/geos/point.pyi @@ -8,21 +8,21 @@ class Point(GEOSGeometry): self, x: Optional[Any] = ..., y: Optional[Any] = ..., z: Optional[Any] = ..., srid: Optional[Any] = ... ) -> None: ... def __iter__(self) -> Any: ... - def __len__(self): ... + def __len__(self) -> Any: ... @property - def x(self): ... + def x(self) -> Any: ... @x.setter def x(self, value: Any) -> None: ... @property - def y(self): ... + def y(self) -> Any: ... @y.setter def y(self, value: Any) -> None: ... @property - def z(self): ... + def z(self) -> Any: ... @z.setter def z(self, value: Any) -> None: ... @property - def tuple(self): ... + def tuple(self) -> Any: ... @tuple.setter def tuple(self, tup: Any) -> None: ... coords: Any = ... diff --git a/django-stubs/contrib/gis/geos/polygon.pyi b/django-stubs/contrib/gis/geos/polygon.pyi index d6aac49..a1dc6a6 100644 --- a/django-stubs/contrib/gis/geos/polygon.pyi +++ b/django-stubs/contrib/gis/geos/polygon.pyi @@ -5,15 +5,15 @@ from django.contrib.gis.geos.geometry import GEOSGeometry as GEOSGeometry class Polygon(GEOSGeometry): def __init__(self, *args: Any, **kwargs: Any) -> None: ... def __iter__(self) -> Any: ... - def __len__(self): ... + def __len__(self) -> Any: ... @classmethod - def from_bbox(cls, bbox: Any): ... + def from_bbox(cls, bbox: Any) -> Any: ... @property - def num_interior_rings(self): ... + def num_interior_rings(self) -> Any: ... exterior_ring: Any = ... shell: Any = ... @property - def tuple(self): ... + def tuple(self) -> Any: ... coords: Any = ... @property - def kml(self): ... + def kml(self) -> Any: ... diff --git a/django-stubs/contrib/gis/geos/prepared.pyi b/django-stubs/contrib/gis/geos/prepared.pyi index 98f79da..731332e 100644 --- a/django-stubs/contrib/gis/geos/prepared.pyi +++ b/django-stubs/contrib/gis/geos/prepared.pyi @@ -7,12 +7,12 @@ class PreparedGeometry(GEOSBase): destructor: Any = ... ptr: Any = ... def __init__(self, geom: Any) -> None: ... - def contains(self, other: Any): ... - def contains_properly(self, other: Any): ... - def covers(self, other: Any): ... - def intersects(self, other: Any): ... - def crosses(self, other: Any): ... - def disjoint(self, other: Any): ... - def overlaps(self, other: Any): ... - def touches(self, other: Any): ... - def within(self, other: Any): ... + def contains(self, other: Any) -> Any: ... + def contains_properly(self, other: Any) -> Any: ... + def covers(self, other: Any) -> Any: ... + def intersects(self, other: Any) -> Any: ... + def crosses(self, other: Any) -> Any: ... + def disjoint(self, other: Any) -> Any: ... + def overlaps(self, other: Any) -> Any: ... + def touches(self, other: Any) -> Any: ... + def within(self, other: Any) -> Any: ... diff --git a/django-stubs/contrib/gis/geos/prototypes/coordseq.pyi b/django-stubs/contrib/gis/geos/prototypes/coordseq.pyi index 9da8732..b31cbea 100644 --- a/django-stubs/contrib/gis/geos/prototypes/coordseq.pyi +++ b/django-stubs/contrib/gis/geos/prototypes/coordseq.pyi @@ -2,8 +2,8 @@ from typing import Any from django.contrib.gis.geos.libgeos import GEOSFuncFactory as GEOSFuncFactory -def check_cs_op(result: Any, func: Any, cargs: Any): ... -def check_cs_get(result: Any, func: Any, cargs: Any): ... +def check_cs_op(result: Any, func: Any, cargs: Any) -> Any: ... +def check_cs_get(result: Any, func: Any, cargs: Any) -> Any: ... class CsInt(GEOSFuncFactory): argtypes: Any = ... @@ -17,7 +17,7 @@ class CsOperation(GEOSFuncFactory): class CsOutput(GEOSFuncFactory): restype: Any = ... @staticmethod - def errcheck(result: Any, func: Any, cargs: Any): ... + def errcheck(result: Any, func: Any, cargs: Any) -> Any: ... cs_clone: Any create_cs: Any diff --git a/django-stubs/contrib/gis/geos/prototypes/errcheck.pyi b/django-stubs/contrib/gis/geos/prototypes/errcheck.pyi index cb1d184..fb59af5 100644 --- a/django-stubs/contrib/gis/geos/prototypes/errcheck.pyi +++ b/django-stubs/contrib/gis/geos/prototypes/errcheck.pyi @@ -2,10 +2,10 @@ from typing import Any free: Any -def last_arg_byref(args: Any): ... -def check_dbl(result: Any, func: Any, cargs: Any): ... -def check_geom(result: Any, func: Any, cargs: Any): ... -def check_minus_one(result: Any, func: Any, cargs: Any): ... -def check_predicate(result: Any, func: Any, cargs: Any): ... -def check_sized_string(result: Any, func: Any, cargs: Any): ... -def check_string(result: Any, func: Any, cargs: Any): ... +def last_arg_byref(args: Any) -> Any: ... +def check_dbl(result: Any, func: Any, cargs: Any) -> Any: ... +def check_geom(result: Any, func: Any, cargs: Any) -> Any: ... +def check_minus_one(result: Any, func: Any, cargs: Any) -> Any: ... +def check_predicate(result: Any, func: Any, cargs: Any) -> Any: ... +def check_sized_string(result: Any, func: Any, cargs: Any) -> Any: ... +def check_string(result: Any, func: Any, cargs: Any) -> Any: ... diff --git a/django-stubs/contrib/gis/geos/prototypes/io.pyi b/django-stubs/contrib/gis/geos/prototypes/io.pyi index 12de4b5..451da5b 100644 --- a/django-stubs/contrib/gis/geos/prototypes/io.pyi +++ b/django-stubs/contrib/gis/geos/prototypes/io.pyi @@ -66,28 +66,28 @@ class IOBase(GEOSBase): class _WKTReader(IOBase): ptr_type: Any = ... destructor: Any = ... - def read(self, wkt: Any): ... + def read(self, wkt: Any) -> Any: ... class _WKBReader(IOBase): ptr_type: Any = ... destructor: Any = ... - def read(self, wkb: Any): ... + def read(self, wkb: Any) -> Any: ... class WKTWriter(IOBase): ptr_type: Any = ... destructor: Any = ... def __init__(self, dim: int = ..., trim: bool = ..., precision: Optional[Any] = ...) -> None: ... - def write(self, geom: Any): ... + def write(self, geom: Any) -> Any: ... @property - def outdim(self): ... + def outdim(self) -> Any: ... @outdim.setter def outdim(self, new_dim: Any) -> None: ... @property - def trim(self): ... + def trim(self) -> Any: ... @trim.setter def trim(self, flag: Any) -> None: ... @property - def precision(self): ... + def precision(self) -> Any: ... @precision.setter def precision(self, precision: Any) -> None: ... @@ -96,15 +96,15 @@ class WKBWriter(IOBase): destructor: Any = ... geos_version: Any = ... def __init__(self, dim: int = ...) -> None: ... - def write(self, geom: Any): ... - def write_hex(self, geom: Any): ... + def write(self, geom: Any) -> Any: ... + def write_hex(self, geom: Any) -> Any: ... byteorder: Any = ... @property - def outdim(self): ... + def outdim(self) -> Any: ... @outdim.setter def outdim(self, new_dim: Any) -> None: ... @property - def srid(self): ... + def srid(self) -> Any: ... @srid.setter def srid(self, include: Any) -> None: ... @@ -117,8 +117,8 @@ class ThreadLocalIO(threading.local): thread_context: Any -def wkt_r(): ... -def wkt_w(dim: int = ..., trim: bool = ..., precision: Optional[Any] = ...): ... -def wkb_r(): ... -def wkb_w(dim: int = ...): ... -def ewkb_w(dim: int = ...): ... +def wkt_r() -> Any: ... +def wkt_w(dim: int = ..., trim: bool = ..., precision: Optional[Any] = ...) -> Any: ... +def wkb_r() -> Any: ... +def wkb_w(dim: int = ...) -> Any: ... +def ewkb_w(dim: int = ...) -> Any: ... diff --git a/django-stubs/contrib/gis/geos/prototypes/threadsafe.pyi b/django-stubs/contrib/gis/geos/prototypes/threadsafe.pyi index e78ae7a..f916b0c 100644 --- a/django-stubs/contrib/gis/geos/prototypes/threadsafe.pyi +++ b/django-stubs/contrib/gis/geos/prototypes/threadsafe.pyi @@ -18,7 +18,7 @@ class GEOSFunc: cfunc: Any = ... thread_context: Any = ... def __init__(self, func_name: Any) -> None: ... - def __call__(self, *args: Any): ... + def __call__(self, *args: Any) -> Any: ... argtypes: Any = ... restype: Any = ... errcheck: Any = ... diff --git a/django-stubs/contrib/gis/measure.pyi b/django-stubs/contrib/gis/measure.pyi index b02f656..2ee3201 100644 --- a/django-stubs/contrib/gis/measure.pyi +++ b/django-stubs/contrib/gis/measure.pyi @@ -7,36 +7,36 @@ class MeasureBase: LALIAS: Any = ... def __init__(self, default_unit: Optional[Any] = ..., **kwargs: Any) -> None: ... standard: Any = ... - def __getattr__(self, name: Any): ... + def __getattr__(self, name: Any) -> Any: ... def __eq__(self, other: Any) -> Any: ... def __lt__(self, other: Any) -> Any: ... - def __add__(self, other: Any): ... - def __iadd__(self, other: Any): ... - def __sub__(self, other: Any): ... - def __isub__(self, other: Any): ... - def __mul__(self, other: Any): ... - def __imul__(self, other: Any): ... - def __rmul__(self, other: Any): ... - def __truediv__(self, other: Any): ... - def __itruediv__(self, other: Any): ... - def __bool__(self): ... - def default_units(self, kwargs: Any): ... + def __add__(self, other: Any) -> Any: ... + def __iadd__(self, other: Any) -> Any: ... + def __sub__(self, other: Any) -> Any: ... + def __isub__(self, other: Any) -> Any: ... + def __mul__(self, other: Any) -> Any: ... + def __imul__(self, other: Any) -> Any: ... + def __rmul__(self, other: Any) -> Any: ... + def __truediv__(self, other: Any) -> Any: ... + def __itruediv__(self, other: Any) -> Any: ... + def __bool__(self) -> Any: ... + def default_units(self, kwargs: Any) -> Any: ... @classmethod - def unit_attname(cls, unit_str: Any): ... + def unit_attname(cls, unit_str: Any) -> Any: ... class Distance(MeasureBase): STANDARD_UNIT: str = ... UNITS: Any = ... ALIAS: Any = ... LALIAS: Any = ... - def __mul__(self, other: Any): ... + def __mul__(self, other: Any) -> Any: ... class Area(MeasureBase): STANDARD_UNIT: Any = ... UNITS: Any = ... ALIAS: Any = ... LALIAS: Any = ... - def __truediv__(self, other: Any): ... + def __truediv__(self, other: Any) -> Any: ... D = Distance A = Area diff --git a/django-stubs/contrib/gis/ptr.pyi b/django-stubs/contrib/gis/ptr.pyi index 8d3110c..10de23b 100644 --- a/django-stubs/contrib/gis/ptr.pyi +++ b/django-stubs/contrib/gis/ptr.pyi @@ -5,7 +5,7 @@ class CPointerBase: destructor: Any = ... null_ptr_exception_class: Any = ... @property - def ptr(self): ... + def ptr(self) -> Any: ... @ptr.setter def ptr(self, ptr: Any) -> None: ... def __del__(self) -> None: ... diff --git a/django-stubs/contrib/gis/serializers/geojson.pyi b/django-stubs/contrib/gis/serializers/geojson.pyi index 0982433..936ae7a 100644 --- a/django-stubs/contrib/gis/serializers/geojson.pyi +++ b/django-stubs/contrib/gis/serializers/geojson.pyi @@ -7,7 +7,7 @@ class Serializer(JSONSerializer): def end_serialization(self) -> None: ... geometry_field: Any = ... def start_object(self, obj: Any) -> None: ... - def get_dump_object(self, obj: Any): ... + def get_dump_object(self, obj: Any) -> Any: ... def handle_field(self, obj: Any, field: Any) -> None: ... class Deserializer: diff --git a/django-stubs/contrib/gis/shortcuts.pyi b/django-stubs/contrib/gis/shortcuts.pyi index ec69fd4..df66977 100644 --- a/django-stubs/contrib/gis/shortcuts.pyi +++ b/django-stubs/contrib/gis/shortcuts.pyi @@ -1,5 +1,5 @@ from typing import Any -def compress_kml(kml: Any): ... -def render_to_kml(*args: Any, **kwargs: Any): ... -def render_to_kmz(*args: Any, **kwargs: Any): ... +def compress_kml(kml: Any) -> Any: ... +def render_to_kml(*args: Any, **kwargs: Any) -> Any: ... +def render_to_kmz(*args: Any, **kwargs: Any) -> Any: ... diff --git a/django-stubs/contrib/gis/sitemaps/kml.pyi b/django-stubs/contrib/gis/sitemaps/kml.pyi index cc61d61..81ee0c6 100644 --- a/django-stubs/contrib/gis/sitemaps/kml.pyi +++ b/django-stubs/contrib/gis/sitemaps/kml.pyi @@ -6,8 +6,8 @@ class KMLSitemap(Sitemap): geo_format: str = ... locations: Any = ... def __init__(self, locations: Optional[Any] = ...) -> None: ... - def items(self): ... - def location(self, obj: Any): ... + def items(self) -> Any: ... + def location(self, obj: Any) -> Any: ... class KMZSitemap(KMLSitemap): geo_format: str = ... diff --git a/django-stubs/contrib/gis/sitemaps/views.pyi b/django-stubs/contrib/gis/sitemaps/views.pyi index 98271fe..4552617 100644 --- a/django-stubs/contrib/gis/sitemaps/views.pyi +++ b/django-stubs/contrib/gis/sitemaps/views.pyi @@ -2,5 +2,5 @@ from typing import Any, Optional def kml( request: Any, label: Any, model: Any, field_name: Optional[Any] = ..., compress: bool = ..., using: Any = ... -): ... -def kmz(request: Any, label: Any, model: Any, field_name: Optional[Any] = ..., using: Any = ...): ... +) -> Any: ... +def kmz(request: Any, label: Any, model: Any, field_name: Optional[Any] = ..., using: Any = ...) -> Any: ... diff --git a/django-stubs/contrib/gis/utils/layermapping.pyi b/django-stubs/contrib/gis/utils/layermapping.pyi index cd86246..dcb9ad6 100644 --- a/django-stubs/contrib/gis/utils/layermapping.pyi +++ b/django-stubs/contrib/gis/utils/layermapping.pyi @@ -35,21 +35,21 @@ class LayerMapping: unique: Optional[Any] = ..., using: Optional[Any] = ..., ) -> None: ... - def check_fid_range(self, fid_range: Any): ... + def check_fid_range(self, fid_range: Any) -> Any: ... geom_field: str = ... fields: Any = ... coord_dim: Any = ... - def check_layer(self): ... - def check_srs(self, source_srs: Any): ... + def check_layer(self) -> Any: ... + def check_srs(self, source_srs: Any) -> Any: ... def check_unique(self, unique: Any) -> None: ... - def feature_kwargs(self, feat: Any): ... - def unique_kwargs(self, kwargs: Any): ... - def verify_ogr_field(self, ogr_field: Any, model_field: Any): ... - def verify_fk(self, feat: Any, rel_model: Any, rel_mapping: Any): ... - def verify_geom(self, geom: Any, model_field: Any): ... - def coord_transform(self): ... - def geometry_field(self): ... - def make_multi(self, geom_type: Any, model_field: Any): ... + def feature_kwargs(self, feat: Any) -> Any: ... + def unique_kwargs(self, kwargs: Any) -> Any: ... + def verify_ogr_field(self, ogr_field: Any, model_field: Any) -> Any: ... + def verify_fk(self, feat: Any, rel_model: Any, rel_mapping: Any) -> Any: ... + def verify_geom(self, geom: Any, model_field: Any) -> Any: ... + def coord_transform(self) -> Any: ... + def geometry_field(self) -> Any: ... + def make_multi(self, geom_type: Any, model_field: Any) -> Any: ... def save( self, verbose: bool = ..., @@ -59,4 +59,4 @@ class LayerMapping: silent: bool = ..., stream: Any = ..., strict: bool = ..., - ): ... + ) -> Any: ... diff --git a/django-stubs/contrib/gis/utils/ogrinspect.pyi b/django-stubs/contrib/gis/utils/ogrinspect.pyi index 984699d..355cd76 100644 --- a/django-stubs/contrib/gis/utils/ogrinspect.pyi +++ b/django-stubs/contrib/gis/utils/ogrinspect.pyi @@ -1,4 +1,4 @@ from typing import Any -def mapping(data_source: Any, geom_name: str = ..., layer_key: int = ..., multi_geom: bool = ...): ... -def ogrinspect(*args: Any, **kwargs: Any): ... +def mapping(data_source: Any, geom_name: str = ..., layer_key: int = ..., multi_geom: bool = ...) -> Any: ... +def ogrinspect(*args: Any, **kwargs: Any) -> Any: ... diff --git a/django-stubs/contrib/gis/views.pyi b/django-stubs/contrib/gis/views.pyi index d5d38d3..f4dcde9 100644 --- a/django-stubs/contrib/gis/views.pyi +++ b/django-stubs/contrib/gis/views.pyi @@ -1,3 +1,3 @@ from typing import Any, Optional -def feed(request: Any, url: Any, feed_dict: Optional[Any] = ...): ... +def feed(request: Any, url: Any, feed_dict: Optional[Any] = ...) -> Any: ... diff --git a/django-stubs/contrib/postgres/constraints.pyi b/django-stubs/contrib/postgres/constraints.pyi index b228608..d9177e4 100644 --- a/django-stubs/contrib/postgres/constraints.pyi +++ b/django-stubs/contrib/postgres/constraints.pyi @@ -19,4 +19,4 @@ class ExclusionConstraint(BaseConstraint): deferrable: Optional[Deferrable] = ..., include: Union[List[str], Tuple[str], None] = ..., opclasses: Union[List[str], Tuple[str]] = ..., - ): ... + ) -> None: ... diff --git a/django-stubs/contrib/postgres/fields/hstore.pyi b/django-stubs/contrib/postgres/fields/hstore.pyi index 700b4d2..207f790 100644 --- a/django-stubs/contrib/postgres/fields/hstore.pyi +++ b/django-stubs/contrib/postgres/fields/hstore.pyi @@ -11,7 +11,7 @@ class KeyTransform(Transform): class KeyTransformFactory: def __init__(self, key_name: str) -> None: ... - def __call__(self, *args, **kwargs) -> KeyTransform: ... + def __call__(self, *args: Any, **kwargs: Any) -> KeyTransform: ... class KeysTransform(Transform): ... class ValuesTransform(Transform): ... diff --git a/django-stubs/contrib/postgres/fields/ranges.pyi b/django-stubs/contrib/postgres/fields/ranges.pyi index 5e38c39..dea70e5 100644 --- a/django-stubs/contrib/postgres/fields/ranges.pyi +++ b/django-stubs/contrib/postgres/fields/ranges.pyi @@ -8,7 +8,7 @@ from typing_extensions import Literal class RangeBoundary(models.Expression): lower: str upper: str - def __init__(self, inclusive_lower: bool = ..., inclusive_upper: bool = ...): ... + def __init__(self, inclusive_lower: bool = ..., inclusive_upper: bool = ...) -> None: ... class RangeOperators: EQUAL: Literal["="] @@ -30,19 +30,19 @@ class RangeField(models.Field): def to_python(self, value: Any) -> Any: ... class IntegerRangeField(RangeField): - def __get__(self, instance, owner) -> NumericRange: ... + def __get__(self, instance: Any, owner: Any) -> NumericRange: ... class BigIntegerRangeField(RangeField): - def __get__(self, instance, owner) -> NumericRange: ... + def __get__(self, instance: Any, owner: Any) -> NumericRange: ... class DecimalRangeField(RangeField): - def __get__(self, instance, owner) -> NumericRange: ... + def __get__(self, instance: Any, owner: Any) -> NumericRange: ... class DateTimeRangeField(RangeField): - def __get__(self, instance, owner) -> DateTimeTZRange: ... + def __get__(self, instance: Any, owner: Any) -> DateTimeTZRange: ... class DateRangeField(RangeField): - def __get__(self, instance, owner) -> DateRange: ... + def __get__(self, instance: Any, owner: Any) -> DateRange: ... class DateTimeRangeContains(PostgresOperatorLookup): lookup_name: str = ... diff --git a/django-stubs/contrib/postgres/search.pyi b/django-stubs/contrib/postgres/search.pyi index 892e64d..0b8b228 100644 --- a/django-stubs/contrib/postgres/search.pyi +++ b/django-stubs/contrib/postgres/search.pyi @@ -58,7 +58,7 @@ class SearchQuery(SearchQueryCombinable, Func): # type: ignore config: Optional[_Expression] = ..., invert: bool = ..., search_type: str = ..., - ): ... + ) -> None: ... def __invert__(self: _T) -> _T: ... class CombinedSearchQuery(SearchQueryCombinable, CombinedExpression): # type: ignore diff --git a/django-stubs/contrib/sessions/backends/base.pyi b/django-stubs/contrib/sessions/backends/base.pyi index db17d0e..7b43763 100644 --- a/django-stubs/contrib/sessions/backends/base.pyi +++ b/django-stubs/contrib/sessions/backends/base.pyi @@ -18,10 +18,10 @@ class SessionBase(Dict[str, Any]): def delete_test_cookie(self) -> None: ... def encode(self, session_dict: Dict[str, Any]) -> str: ... def decode(self, session_data: Union[bytes, str]) -> Dict[str, Any]: ... - def has_key(self, key: Any): ... - def keys(self): ... - def values(self): ... - def items(self): ... + def has_key(self, key: Any) -> Any: ... + def keys(self) -> Any: ... + def values(self) -> Any: ... + def items(self) -> Any: ... def clear(self) -> None: ... def is_empty(self) -> bool: ... def _get_session_key(self) -> str: ... diff --git a/django-stubs/db/backends/mysql/introspection.pyi b/django-stubs/db/backends/mysql/introspection.pyi index 80ed69c..e39af16 100644 --- a/django-stubs/db/backends/mysql/introspection.pyi +++ b/django-stubs/db/backends/mysql/introspection.pyi @@ -23,11 +23,11 @@ InfoLine = namedtuple( class DatabaseIntrospection(BaseDatabaseIntrospection): connection: DatabaseWrapper data_types_reverse: Any = ... - def get_field_type(self, data_type: Any, description: Any): ... - def get_table_list(self, cursor: Any): ... - def get_table_description(self, cursor: Any, table_name: Any): ... - def get_sequences(self, cursor: Any, table_name: Any, table_fields: Any = ...): ... - def get_relations(self, cursor: Any, table_name: Any): ... - def get_key_columns(self, cursor: Any, table_name: Any): ... - def get_storage_engine(self, cursor: Any, table_name: Any): ... - def get_constraints(self, cursor: Any, table_name: Any): ... + def get_field_type(self, data_type: Any, description: Any) -> Any: ... + def get_table_list(self, cursor: Any) -> Any: ... + def get_table_description(self, cursor: Any, table_name: Any) -> Any: ... + def get_sequences(self, cursor: Any, table_name: Any, table_fields: Any = ...) -> Any: ... + def get_relations(self, cursor: Any, table_name: Any) -> Any: ... + def get_key_columns(self, cursor: Any, table_name: Any) -> Any: ... + def get_storage_engine(self, cursor: Any, table_name: Any) -> Any: ... + def get_constraints(self, cursor: Any, table_name: Any) -> Any: ... diff --git a/django-stubs/db/backends/mysql/operations.pyi b/django-stubs/db/backends/mysql/operations.pyi index 40f212c..86701ba 100644 --- a/django-stubs/db/backends/mysql/operations.pyi +++ b/django-stubs/db/backends/mysql/operations.pyi @@ -10,34 +10,34 @@ class DatabaseOperations(BaseDatabaseOperations): cast_data_types: Dict[str, str] = ... cast_char_field_without_max_length: str = ... explain_prefix: str = ... - def date_extract_sql(self, lookup_type: str, field_name: str): ... - def date_trunc_sql(self, lookup_type: str, field_name: str, tzname: Optional[str] = ...): ... - def datetime_cast_date_sql(self, field_name: str, tzname: Optional[str]): ... - def datetime_cast_time_sql(self, field_name: str, tzname: Optional[str]): ... - def datetime_extract_sql(self, lookup_type: str, field_name: str, tzname: Optional[str]): ... - def datetime_trunc_sql(self, lookup_type: str, field_name: str, tzname: Optional[str]): ... - def time_trunc_sql(self, lookup_type: str, field_name: str, tzname: Optional[str] = ...): ... - def fetch_returned_insert_rows(self, cursor: Any): ... - def format_for_duration_arithmetic(self, sql: Any): ... - def force_no_ordering(self): ... - def last_executed_query(self, cursor: Any, sql: Any, params: Any): ... - def no_limit_value(self): ... - def quote_name(self, name: str): ... - def return_insert_columns(self, fields: Any): ... - def sequence_reset_by_name_sql(self, style: Any, sequences: Any): ... - def validate_autopk_value(self, value: Any): ... - def adapt_datetimefield_value(self, value: Any): ... - def adapt_timefield_value(self, value: Any): ... - def max_name_length(self): ... - def bulk_insert_sql(self, fields: Any, placeholder_rows: Any): ... - def combine_expression(self, connector: Any, sub_expressions: Any): ... - def get_db_converters(self, expression: Any): ... - def convert_booleanfield_value(self, value: Any, expression: Any, connection: Any): ... - def convert_datetimefield_value(self, value: Any, expression: Any, connection: Any): ... - def convert_uuidfield_value(self, value: Any, expression: Any, connection: Any): ... - def binary_placeholder_sql(self, value: Any): ... - def subtract_temporals(self, internal_type: Any, lhs: Any, rhs: Any): ... - def explain_query_prefix(self, format: Optional[Any] = ..., **options: Any): ... - def regex_lookup(self, lookup_type: str): ... - def insert_statement(self, ignore_conflicts: bool = ...): ... - def lookup_cast(self, lookup_type: str, internal_type: Optional[Any] = ...): ... + def date_extract_sql(self, lookup_type: str, field_name: str) -> Any: ... + def date_trunc_sql(self, lookup_type: str, field_name: str, tzname: Optional[str] = ...) -> Any: ... + def datetime_cast_date_sql(self, field_name: str, tzname: Optional[str]) -> Any: ... + def datetime_cast_time_sql(self, field_name: str, tzname: Optional[str]) -> Any: ... + def datetime_extract_sql(self, lookup_type: str, field_name: str, tzname: Optional[str]) -> Any: ... + def datetime_trunc_sql(self, lookup_type: str, field_name: str, tzname: Optional[str]) -> Any: ... + def time_trunc_sql(self, lookup_type: str, field_name: str, tzname: Optional[str] = ...) -> Any: ... + def fetch_returned_insert_rows(self, cursor: Any) -> Any: ... + def format_for_duration_arithmetic(self, sql: Any) -> Any: ... + def force_no_ordering(self) -> Any: ... + def last_executed_query(self, cursor: Any, sql: Any, params: Any) -> Any: ... + def no_limit_value(self) -> Any: ... + def quote_name(self, name: str) -> Any: ... + def return_insert_columns(self, fields: Any) -> Any: ... + def sequence_reset_by_name_sql(self, style: Any, sequences: Any) -> Any: ... + def validate_autopk_value(self, value: Any) -> Any: ... + def adapt_datetimefield_value(self, value: Any) -> Any: ... + def adapt_timefield_value(self, value: Any) -> Any: ... + def max_name_length(self) -> Any: ... + def bulk_insert_sql(self, fields: Any, placeholder_rows: Any) -> Any: ... + def combine_expression(self, connector: Any, sub_expressions: Any) -> Any: ... + def get_db_converters(self, expression: Any) -> Any: ... + def convert_booleanfield_value(self, value: Any, expression: Any, connection: Any) -> Any: ... + def convert_datetimefield_value(self, value: Any, expression: Any, connection: Any) -> Any: ... + def convert_uuidfield_value(self, value: Any, expression: Any, connection: Any) -> Any: ... + def binary_placeholder_sql(self, value: Any) -> Any: ... + def subtract_temporals(self, internal_type: Any, lhs: Any, rhs: Any) -> Any: ... + def explain_query_prefix(self, format: Optional[Any] = ..., **options: Any) -> Any: ... + def regex_lookup(self, lookup_type: str) -> Any: ... + def insert_statement(self, ignore_conflicts: bool = ...) -> Any: ... + def lookup_cast(self, lookup_type: str, internal_type: Optional[Any] = ...) -> Any: ... diff --git a/django-stubs/db/backends/mysql/validation.pyi b/django-stubs/db/backends/mysql/validation.pyi index 43166f2..a67255c 100644 --- a/django-stubs/db/backends/mysql/validation.pyi +++ b/django-stubs/db/backends/mysql/validation.pyi @@ -5,5 +5,5 @@ from django.db.backends.mysql.base import DatabaseWrapper class DatabaseValidation(BaseDatabaseValidation): connection: DatabaseWrapper - def check(self, **kwargs: Any): ... - def check_field_type(self, field: Any, field_type: Any): ... + def check(self, **kwargs: Any) -> Any: ... + def check_field_type(self, field: Any, field_type: Any) -> Any: ... diff --git a/django-stubs/db/backends/oracle/base.pyi b/django-stubs/db/backends/oracle/base.pyi index 41e13d1..e4a43b6 100644 --- a/django-stubs/db/backends/oracle/base.pyi +++ b/django-stubs/db/backends/oracle/base.pyi @@ -14,7 +14,7 @@ from .validation import DatabaseValidation def wrap_oracle_errors() -> Generator[None, None, None]: ... class _UninitializedOperatorsDescriptor: - def __get__(self, instance: Any, cls: Optional[Any] = ...): ... + def __get__(self, instance: Any, cls: Optional[Any] = ...) -> Any: ... class DatabaseWrapper(BaseDatabaseWrapper): client: DatabaseClient @@ -40,17 +40,17 @@ class DatabaseWrapper(BaseDatabaseWrapper): Database: Any = ... SchemaEditorClass: Any = ... def __init__(self, *args: Any, **kwargs: Any) -> None: ... - def get_connection_params(self): ... - def get_new_connection(self, conn_params: Any): ... + def get_connection_params(self) -> Any: ... + def get_new_connection(self, conn_params: Any) -> Any: ... pattern_ops: Any = ... def init_connection_state(self) -> None: ... - def create_cursor(self, name: Optional[Any] = ...): ... + def create_cursor(self, name: Optional[Any] = ...) -> Any: ... def check_constraints(self, table_names: Optional[Any] = ...) -> None: ... - def is_usable(self): ... + def is_usable(self) -> Any: ... @property - def cx_oracle_version(self): ... + def cx_oracle_version(self) -> Any: ... @property - def oracle_version(self): ... + def oracle_version(self) -> Any: ... class OracleParam: force_bytes: Any = ... @@ -60,18 +60,18 @@ class OracleParam: class VariableWrapper: var: Any = ... def __init__(self, var: Any) -> None: ... - def bind_parameter(self, cursor: Any): ... - def __getattr__(self, key: Any): ... + def bind_parameter(self, cursor: Any) -> Any: ... + def __getattr__(self, key: Any) -> Any: ... def __setattr__(self, key: Any, value: Any) -> None: ... class FormatStylePlaceholderCursor: charset: str = ... cursor: Any = ... def __init__(self, connection: Any) -> None: ... - def execute(self, query: Any, params: Optional[Any] = ...): ... - def executemany(self, query: Any, params: Optional[Any] = ...): ... + def execute(self, query: Any, params: Optional[Any] = ...) -> Any: ... + def executemany(self, query: Any, params: Optional[Any] = ...) -> Any: ... def close(self) -> None: ... - def var(self, *args: Any): ... - def arrayvar(self, *args: Any): ... - def __getattr__(self, attr: Any): ... + def var(self, *args: Any) -> Any: ... + def arrayvar(self, *args: Any) -> Any: ... + def __getattr__(self, attr: Any) -> Any: ... def __iter__(self) -> Any: ... diff --git a/django-stubs/db/backends/oracle/creation.pyi b/django-stubs/db/backends/oracle/creation.pyi index a2c997a..9a7e743 100644 --- a/django-stubs/db/backends/oracle/creation.pyi +++ b/django-stubs/db/backends/oracle/creation.pyi @@ -8,4 +8,4 @@ TEST_DATABASE_PREFIX: str class DatabaseCreation(BaseDatabaseCreation): connection: DatabaseWrapper def set_as_test_mirror(self, primary_settings_dict: Any) -> None: ... - def test_db_signature(self): ... + def test_db_signature(self) -> Any: ... diff --git a/django-stubs/db/backends/oracle/introspection.pyi b/django-stubs/db/backends/oracle/introspection.pyi index 75d0419..4d70ca3 100644 --- a/django-stubs/db/backends/oracle/introspection.pyi +++ b/django-stubs/db/backends/oracle/introspection.pyi @@ -9,13 +9,13 @@ class DatabaseIntrospection(BaseDatabaseIntrospection): connection: DatabaseWrapper cache_bust_counter: int = ... @property - def data_types_reverse(self): ... - def get_field_type(self, data_type: Any, description: Any): ... - def get_table_list(self, cursor: Any): ... - def get_table_description(self, cursor: Any, table_name: Any): ... - def identifier_converter(self, name: Any): ... - def get_sequences(self, cursor: Any, table_name: Any, table_fields: Any = ...): ... - def get_relations(self, cursor: Any, table_name: Any): ... - def get_key_columns(self, cursor: Any, table_name: Any): ... - def get_primary_key_column(self, cursor: Any, table_name: Any): ... - def get_constraints(self, cursor: Any, table_name: Any): ... + def data_types_reverse(self) -> Any: ... + def get_field_type(self, data_type: Any, description: Any) -> Any: ... + def get_table_list(self, cursor: Any) -> Any: ... + def get_table_description(self, cursor: Any, table_name: Any) -> Any: ... + def identifier_converter(self, name: Any) -> Any: ... + def get_sequences(self, cursor: Any, table_name: Any, table_fields: Any = ...) -> Any: ... + def get_relations(self, cursor: Any, table_name: Any) -> Any: ... + def get_key_columns(self, cursor: Any, table_name: Any) -> Any: ... + def get_primary_key_column(self, cursor: Any, table_name: Any) -> Any: ... + def get_constraints(self, cursor: Any, table_name: Any) -> Any: ... diff --git a/django-stubs/db/backends/oracle/utils.pyi b/django-stubs/db/backends/oracle/utils.pyi index 3fc6c95..081b0a7 100644 --- a/django-stubs/db/backends/oracle/utils.pyi +++ b/django-stubs/db/backends/oracle/utils.pyi @@ -6,13 +6,13 @@ class InsertVar: db_type: Any = ... bound_param: Any = ... def __init__(self, field: Any) -> None: ... - def bind_parameter(self, cursor: Any): ... - def get_value(self): ... + def bind_parameter(self, cursor: Any) -> Any: ... + def get_value(self) -> Any: ... class Oracle_datetime(datetime.datetime): input_size: Any = ... @classmethod - def from_datetime(cls, dt: Any): ... + def from_datetime(cls, dt: Any) -> Any: ... class BulkInsertMapper: BLOB: str = ... diff --git a/django-stubs/db/backends/oracle/validation.pyi b/django-stubs/db/backends/oracle/validation.pyi index 54a3f4d..e69e2e7 100644 --- a/django-stubs/db/backends/oracle/validation.pyi +++ b/django-stubs/db/backends/oracle/validation.pyi @@ -5,4 +5,4 @@ from django.db.backends.oracle.base import DatabaseWrapper class DatabaseValidation(BaseDatabaseValidation): connection: DatabaseWrapper - def check_field_type(self, field: Any, field_type: Any): ... + def check_field_type(self, field: Any, field_type: Any) -> Any: ... diff --git a/django-stubs/db/backends/postgresql/base.pyi b/django-stubs/db/backends/postgresql/base.pyi index a59100e..78694da 100644 --- a/django-stubs/db/backends/postgresql/base.pyi +++ b/django-stubs/db/backends/postgresql/base.pyi @@ -38,5 +38,5 @@ class DatabaseWrapper(BaseDatabaseWrapper): def pg_version(self) -> int: ... class CursorDebugWrapper(BaseCursorDebugWrapper): - def copy_expert(self, sql: _ExecuteQuery, file: IOBase, *args: Any): ... - def copy_to(self, file: IOBase, table: str, *args: Any, **kwargs: Any): ... + def copy_expert(self, sql: _ExecuteQuery, file: IOBase, *args: Any) -> Any: ... + def copy_to(self, file: IOBase, table: str, *args: Any, **kwargs: Any) -> Any: ... diff --git a/django-stubs/db/backends/postgresql/introspection.pyi b/django-stubs/db/backends/postgresql/introspection.pyi index ce46d93..74067db 100644 --- a/django-stubs/db/backends/postgresql/introspection.pyi +++ b/django-stubs/db/backends/postgresql/introspection.pyi @@ -7,10 +7,10 @@ class DatabaseIntrospection(BaseDatabaseIntrospection): connection: DatabaseWrapper data_types_reverse: Any = ... ignored_tables: Any = ... - def get_field_type(self, data_type: Any, description: Any): ... - def get_table_list(self, cursor: Any): ... - def get_table_description(self, cursor: Any, table_name: Any): ... - def get_sequences(self, cursor: Any, table_name: Any, table_fields: Any = ...): ... - def get_relations(self, cursor: Any, table_name: Any): ... - def get_key_columns(self, cursor: Any, table_name: Any): ... - def get_constraints(self, cursor: Any, table_name: Any): ... + def get_field_type(self, data_type: Any, description: Any) -> Any: ... + def get_table_list(self, cursor: Any) -> Any: ... + def get_table_description(self, cursor: Any, table_name: Any) -> Any: ... + def get_sequences(self, cursor: Any, table_name: Any, table_fields: Any = ...) -> Any: ... + def get_relations(self, cursor: Any, table_name: Any) -> Any: ... + def get_key_columns(self, cursor: Any, table_name: Any) -> Any: ... + def get_constraints(self, cursor: Any, table_name: Any) -> Any: ... diff --git a/django-stubs/db/migrations/operations/models.pyi b/django-stubs/db/migrations/operations/models.pyi index 1381cc3..baf1fa2 100644 --- a/django-stubs/db/migrations/operations/models.pyi +++ b/django-stubs/db/migrations/operations/models.pyi @@ -107,7 +107,7 @@ class RemoveIndex(IndexOperation): def __init__(self, model_name: str, name: str) -> None: ... class AddConstraint(IndexOperation): - def __init__(self, model_name: str, constraint: BaseConstraint): ... + def __init__(self, model_name: str, constraint: BaseConstraint) -> None: ... class RemoveConstraint(IndexOperation): def __init__(self, model_name: str, name: str) -> None: ... diff --git a/django-stubs/db/models/expressions.pyi b/django-stubs/db/models/expressions.pyi index 0481e00..5736f1f 100644 --- a/django-stubs/db/models/expressions.pyi +++ b/django-stubs/db/models/expressions.pyi @@ -120,7 +120,7 @@ class CombinedExpression(SQLiteNumericMixin, Expression): class F(Combinable): name: str - def __init__(self, name: str): ... + def __init__(self, name: str) -> None: ... def resolve_expression( self, query: Any = ..., @@ -147,7 +147,7 @@ class F(Combinable): class ResolvedOuterRef(F): ... class OuterRef(F): - def __init__(self, name: Union[str, OuterRef]): ... + def __init__(self, name: Union[str, OuterRef]) -> None: ... contains_aggregate: bool def relabeled_clone(self: _Self, relabels: Any) -> _Self: ... @@ -212,17 +212,17 @@ class Case(Expression): ) -> None: ... class ExpressionWrapper(Expression): - def __init__(self, expression: Union[Q, Combinable], output_field: Field): ... + def __init__(self, expression: Union[Q, Combinable], output_field: Field) -> None: ... class Col(Expression): target: Field alias: str contains_column_references: Literal[True] = ... possibly_multivalued: Literal[False] = ... - def __init__(self, alias: str, target: Field, output_field: Optional[Field] = ...): ... + def __init__(self, alias: str, target: Field, output_field: Optional[Field] = ...) -> None: ... class Ref(Expression): - def __init__(self, refs: str, source: Expression): ... + def __init__(self, refs: str, source: Expression) -> None: ... class ExpressionList(Func): def __init__(self, *expressions: Union[BaseExpression, Combinable], **extra: Any) -> None: ... diff --git a/django-stubs/db/models/fields/__init__.pyi b/django-stubs/db/models/fields/__init__.pyi index cb5c0c2..15a11ee 100644 --- a/django-stubs/db/models/fields/__init__.pyi +++ b/django-stubs/db/models/fields/__init__.pyi @@ -180,17 +180,17 @@ class Field(RegisterLookupMixin, Generic[_ST, _GT]): auto_created: bool = ..., validators: Iterable[validators._ValidatorCallable] = ..., error_messages: Optional[_ErrorMessagesT] = ..., - ): ... - def __set__(self, instance, value: _ST) -> None: ... + ) -> None: ... + def __set__(self, instance: Any, value: _ST) -> None: ... # class access @overload - def __get__(self: _T, instance: None, owner) -> _T: ... + def __get__(self: _T, instance: None, owner: Any) -> _T: ... # Model instance access @overload - def __get__(self, instance: Model, owner) -> _GT: ... + def __get__(self, instance: Model, owner: Any) -> _GT: ... # non-Model instances @overload - def __get__(self: _T, instance, owner) -> _T: ... + def __get__(self: _T, instance: Any, owner: Any) -> _T: ... def deconstruct(self) -> Any: ... def set_attributes_from_name(self, name: str) -> None: ... def db_type_parameters(self, connection: BaseDatabaseWrapper) -> DictWrapper: ... @@ -282,7 +282,7 @@ class DecimalField(Field[_ST, _GT]): db_tablespace: Optional[str] = ..., validators: Iterable[validators._ValidatorCallable] = ..., error_messages: Optional[_ErrorMessagesT] = ..., - ): ... + ) -> None: ... class CharField(Field[_ST, _GT]): _pyi_private_set_type: Union[str, int, Combinable] @@ -314,7 +314,7 @@ class CharField(Field[_ST, _GT]): error_messages: Optional[_ErrorMessagesT] = ..., *, db_collation: Optional[str] = ..., - ): ... + ) -> None: ... class CommaSeparatedIntegerField(CharField[_ST, _GT]): ... @@ -344,7 +344,7 @@ class SlugField(CharField[_ST, _GT]): max_length: Optional[int] = ..., db_index: bool = ..., allow_unicode: bool = ..., - ): ... + ) -> None: ... class EmailField(CharField[_ST, _GT]): ... @@ -374,7 +374,7 @@ class URLField(CharField[_ST, _GT]): auto_created: bool = ..., validators: Iterable[validators._ValidatorCallable] = ..., error_messages: Optional[_ErrorMessagesT] = ..., - ): ... + ) -> None: ... class TextField(Field[_ST, _GT]): _pyi_private_set_type: Union[str, Combinable] @@ -406,7 +406,7 @@ class TextField(Field[_ST, _GT]): error_messages: Optional[_ErrorMessagesT] = ..., *, db_collation: Optional[str] = ..., - ): ... + ) -> None: ... class BooleanField(Field[_ST, _GT]): _pyi_private_set_type: Union[bool, Combinable] @@ -483,7 +483,7 @@ class DateField(DateTimeCheckMixin, Field[_ST, _GT]): db_tablespace: Optional[str] = ..., validators: Iterable[validators._ValidatorCallable] = ..., error_messages: Optional[_ErrorMessagesT] = ..., - ): ... + ) -> None: ... class TimeField(DateTimeCheckMixin, Field[_ST, _GT]): _pyi_private_set_type: Union[str, time, real_datetime, Combinable] @@ -512,7 +512,7 @@ class TimeField(DateTimeCheckMixin, Field[_ST, _GT]): db_tablespace: Optional[str] = ..., validators: Iterable[validators._ValidatorCallable] = ..., error_messages: Optional[_ErrorMessagesT] = ..., - ): ... + ) -> None: ... class DateTimeField(DateField[_ST, _GT]): _pyi_private_set_type: Union[str, real_datetime, date, Combinable] @@ -548,7 +548,7 @@ class UUIDField(Field[_ST, _GT]): auto_created: bool = ..., validators: Iterable[validators._ValidatorCallable] = ..., error_messages: Optional[_ErrorMessagesT] = ..., - ): ... + ) -> None: ... class FilePathField(Field[_ST, _GT]): path: Any = ... @@ -582,7 +582,7 @@ class FilePathField(Field[_ST, _GT]): db_tablespace: Optional[str] = ..., validators: Iterable[validators._ValidatorCallable] = ..., error_messages: Optional[_ErrorMessagesT] = ..., - ): ... + ) -> None: ... class BinaryField(Field[_ST, _GT]): _pyi_private_get_type: Union[bytes, memoryview] diff --git a/django-stubs/db/models/fields/files.pyi b/django-stubs/db/models/fields/files.pyi index b604b05..3f83253 100644 --- a/django-stubs/db/models/fields/files.pyi +++ b/django-stubs/db/models/fields/files.pyi @@ -70,16 +70,16 @@ class FileField(Field): db_tablespace: Optional[str] = ..., validators: Iterable[validators._ValidatorCallable] = ..., error_messages: Optional[_ErrorMessagesT] = ..., - ): ... + ) -> None: ... # class access @overload # type: ignore - def __get__(self, instance: None, owner) -> FileDescriptor: ... + def __get__(self, instance: None, owner: Any) -> FileDescriptor: ... # Model instance access @overload - def __get__(self, instance: Model, owner) -> Any: ... + def __get__(self, instance: Model, owner: Any) -> Any: ... # non-Model instances @overload - def __get__(self: _T, instance, owner) -> _T: ... + def __get__(self: _T, instance: Any, owner: Any) -> _T: ... def generate_filename(self, instance: Optional[Model], filename: _PathCompatible) -> str: ... class ImageFileDescriptor(FileDescriptor): @@ -101,11 +101,11 @@ class ImageField(FileField): ) -> None: ... # class access @overload # type: ignore - def __get__(self, instance: None, owner) -> ImageFileDescriptor: ... + def __get__(self, instance: None, owner: Any) -> ImageFileDescriptor: ... # Model instance access @overload - def __get__(self, instance: Model, owner) -> Any: ... + def __get__(self, instance: Model, owner: Any) -> Any: ... # non-Model instances @overload - def __get__(self: _T, instance, owner) -> _T: ... + def __get__(self: _T, instance: Any, owner: Any) -> _T: ... def update_dimension_fields(self, instance: Model, force: bool = ..., *args: Any, **kwargs: Any) -> None: ... diff --git a/django-stubs/db/models/fields/mixins.pyi b/django-stubs/db/models/fields/mixins.pyi index 6e51a29..4ac0845 100644 --- a/django-stubs/db/models/fields/mixins.pyi +++ b/django-stubs/db/models/fields/mixins.pyi @@ -12,4 +12,4 @@ class FieldCacheMixin: def delete_cached_value(self, instance: Model) -> None: ... class CheckFieldDefaultMixin: - def check(self, **kwargs: Any): ... + def check(self, **kwargs: Any) -> Any: ... diff --git a/django-stubs/db/models/fields/related.pyi b/django-stubs/db/models/fields/related.pyi index 8ed1954..18c986a 100644 --- a/django-stubs/db/models/fields/related.pyi +++ b/django-stubs/db/models/fields/related.pyi @@ -95,7 +95,7 @@ class ForeignObject(RelatedField[_ST, _GT]): db_tablespace: Optional[str] = ..., validators: Iterable[validators._ValidatorCallable] = ..., error_messages: Optional[_ErrorMessagesT] = ..., - ): ... + ) -> None: ... def resolve_related_fields(self) -> List[Tuple[Field, Field]]: ... @property def related_fields(self) -> List[Tuple[Field, Field]]: ... @@ -144,16 +144,16 @@ class ForeignKey(ForeignObject[_ST, _GT]): db_tablespace: Optional[str] = ..., validators: Iterable[validators._ValidatorCallable] = ..., error_messages: Optional[_ErrorMessagesT] = ..., - ): ... + ) -> None: ... # class access @overload # type: ignore - def __get__(self, instance: None, owner) -> ForwardManyToOneDescriptor: ... + def __get__(self, instance: None, owner: Any) -> ForwardManyToOneDescriptor: ... # Model instance access @overload - def __get__(self, instance: Model, owner) -> _GT: ... + def __get__(self, instance: Model, owner: Any) -> _GT: ... # non-Model instances @overload - def __get__(self: _F, instance, owner) -> _F: ... + def __get__(self: _F, instance: Any, owner: Any) -> _F: ... class OneToOneField(ForeignKey[_ST, _GT]): _pyi_private_set_type: Union[Any, Combinable] @@ -193,16 +193,16 @@ class OneToOneField(ForeignKey[_ST, _GT]): db_tablespace: Optional[str] = ..., validators: Iterable[validators._ValidatorCallable] = ..., error_messages: Optional[_ErrorMessagesT] = ..., - ): ... + ) -> None: ... # class access @overload # type: ignore - def __get__(self, instance: None, owner) -> ForwardOneToOneDescriptor: ... + def __get__(self, instance: None, owner: Any) -> ForwardOneToOneDescriptor: ... # Model instance access @overload - def __get__(self, instance: Model, owner) -> _GT: ... + def __get__(self, instance: Model, owner: Any) -> _GT: ... # non-Model instances @overload - def __get__(self: _F, instance, owner) -> _F: ... + def __get__(self: _F, instance: Any, owner: Any) -> _F: ... class ManyToManyField(RelatedField[_ST, _GT]): _pyi_private_set_type: Sequence[Any] @@ -256,13 +256,13 @@ class ManyToManyField(RelatedField[_ST, _GT]): ) -> None: ... # class access @overload # type: ignore - def __get__(self, instance: None, owner) -> ManyToManyDescriptor: ... + def __get__(self, instance: None, owner: Any) -> ManyToManyDescriptor: ... # Model instance access @overload - def __get__(self, instance: Model, owner) -> _GT: ... + def __get__(self, instance: Model, owner: Any) -> _GT: ... # non-Model instances @overload - def __get__(self: _F, instance, owner) -> _F: ... + def __get__(self: _F, instance: Any, owner: Any) -> _F: ... def get_path_info(self, filtered_relation: Optional[FilteredRelation] = ...) -> List[PathInfo]: ... def get_reverse_path_info(self, filtered_relation: Optional[FilteredRelation] = ...) -> List[PathInfo]: ... def contribute_to_related_class(self, cls: Type[Model], related: RelatedField) -> None: ... diff --git a/django-stubs/forms/widgets.pyi b/django-stubs/forms/widgets.pyi index 4c7f7ed..a9b1101 100644 --- a/django-stubs/forms/widgets.pyi +++ b/django-stubs/forms/widgets.pyi @@ -121,7 +121,7 @@ class DateTimeBaseInput(TextInput): format_key: str = ... format: Optional[str] = ... supports_microseconds: bool = ... - def __init__(self, attrs: Optional[_OptAttrs] = ..., format: Optional[str] = ...): ... + def __init__(self, attrs: Optional[_OptAttrs] = ..., format: Optional[str] = ...) -> None: ... class DateInput(DateTimeBaseInput): format_key: str = ... diff --git a/django-stubs/utils/functional.pyi b/django-stubs/utils/functional.pyi index 83ff039..2047351 100644 --- a/django-stubs/utils/functional.pyi +++ b/django-stubs/utils/functional.pyi @@ -9,7 +9,7 @@ _T = TypeVar("_T") class cached_property(Generic[_T]): func: Callable[..., _T] = ... name: str = ... - def __init__(self, func: Callable[..., _T], name: str = ...): ... + def __init__(self, func: Callable[..., _T], name: str = ...) -> None: ... @overload def __get__(self, instance: None, cls: Type[Any] = ...) -> "cached_property[_T]": ... @overload diff --git a/django_stubs_ext/django_stubs_ext/patch.py b/django_stubs_ext/django_stubs_ext/patch.py index eb32b12..fc73e66 100644 --- a/django_stubs_ext/django_stubs_ext/patch.py +++ b/django_stubs_ext/django_stubs_ext/patch.py @@ -35,7 +35,7 @@ class MPGeneric(Generic[_T]): possible issues we may run into with this method. """ - def __init__(self, cls: Type[_T], version: Optional[_VersionSpec] = None): + def __init__(self, cls: Type[_T], version: Optional[_VersionSpec] = None) -> None: """Set the data fields, basic constructor.""" self.version = version self.cls = cls diff --git a/mypy.ini b/mypy.ini index c76042b..ef5b061 100644 --- a/mypy.ini +++ b/mypy.ini @@ -12,9 +12,16 @@ warn_unused_ignores = True warn_redundant_casts = True warn_unused_configs = True warn_unreachable = True +disallow_untyped_defs = true +disallow_incomplete_defs = true plugins = mypy_django_plugin.main +# Ignore incomplete hints in yaml-stubs +[mypy-yaml.*] +disallow_untyped_defs = false +disallow_incomplete_defs = false + [mypy.plugins.django-stubs] django_settings_module = scripts.django_tests_settings diff --git a/mypy_django_plugin/transformers/models.py b/mypy_django_plugin/transformers/models.py index 5cf0c2d..cb7c284 100644 --- a/mypy_django_plugin/transformers/models.py +++ b/mypy_django_plugin/transformers/models.py @@ -29,7 +29,7 @@ from mypy_django_plugin.transformers.managers import ( class ModelClassInitializer: api: SemanticAnalyzer - def __init__(self, ctx: ClassDefContext, django_context: DjangoContext): + def __init__(self, ctx: ClassDefContext, django_context: DjangoContext) -> None: self.api = cast(SemanticAnalyzer, ctx.api) self.model_classdef = ctx.cls self.django_context = django_context diff --git a/tests/typecheck/managers/test_managers.yml b/tests/typecheck/managers/test_managers.yml index 583b48c..1a0e626 100644 --- a/tests/typecheck/managers/test_managers.yml +++ b/tests/typecheck/managers/test_managers.yml @@ -355,7 +355,7 @@ class MyManager(models.Manager): def get_instance(self) -> int: pass - def get_instance_untyped(self, name: str): + def get_instance_untyped(self, name: str): # type: ignore[no-untyped-def] pass class User(models.Model): objects = MyManager()