Skip to content

Commit 9c3b755

Browse files
committed
Silence some @cached_property overrides for now
These are cached properties that override a plain attribute and so stubtest complains with the following: ``` error: django.contrib.gis.db.backends.oracle.features.DatabaseFeatures.django_test_skips variable differs from runtime type functools.cached_property[Any] Stub: in file /home/nick/Sources/_external/django-stubs/django-stubs/contrib/gis/db/backends/oracle/features.pyi:145 builtins.dict[builtins.str, builtins.set[builtins.str]] Runtime: <django.utils.functional.cached_property object at 0x7f628c1d8f50> error: django.db.backends.oracle.features.DatabaseFeatures.django_test_skips variable differs from runtime type functools.cached_property[Any] Stub: in file /home/nick/Sources/_external/django-stubs/django-stubs/db/backends/oracle/features.pyi:145 builtins.dict[builtins.str, builtins.set[builtins.str]] Runtime: <django.utils.functional.cached_property object at 0x7f628c1c5910> error: django.db.backends.oracle.features.DatabaseFeatures.supports_frame_exclusion variable differs from runtime type functools.cached_property[Any] Stub: in file /home/nick/Sources/_external/django-stubs/django-stubs/db/backends/oracle/features.pyi:102 builtins.bool Runtime: <django.utils.functional.cached_property object at 0x7f628c1c5b20> ``` There are many others of these that need looking at properly, so skip them for now...
1 parent a88638d commit 9c3b755

File tree

2 files changed

+3
-5
lines changed

2 files changed

+3
-5
lines changed
Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,9 @@
1-
from typing import Any
2-
31
from django.contrib.gis.db.backends.base.features import BaseSpatialFeatures
42
from django.db.backends.oracle.features import DatabaseFeatures as OracleDatabaseFeatures
5-
from django.utils.functional import cached_property
63

74
class DatabaseFeatures(BaseSpatialFeatures, OracleDatabaseFeatures):
85
supports_add_srs_entry: bool
96
supports_geometry_field_introspection: bool
107
supports_geometry_field_unique_index: bool
118
supports_perimeter_geodetic: bool
129
supports_dwithin_distance_expr: bool
13-
@cached_property
14-
def django_test_skips(self) -> dict[str, Any]: ... # type: ignore[override]

scripts/stubtest/allowlist_todo.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,7 @@ django.contrib.gis.admin.GISModelAdmin.gis_widget
137137
django.contrib.gis.admin.options.GISModelAdmin.gis_widget
138138
django.contrib.gis.admin.options.GeoModelAdminMixin
139139
django.contrib.gis.admin.site
140+
django.contrib.gis.db.backends.oracle.features.DatabaseFeatures.django_test_skips
140141
django.contrib.gis.db.backends.postgis.operations.PostGISOperations.convert_extent
141142
django.contrib.gis.db.backends.postgis.operations.PostGISOperations.convert_extent3d
142143
django.contrib.gis.db.backends.postgis.schema.PostGISSchemaEditor.rast_index_template
@@ -428,8 +429,10 @@ django.db.backends.mysql.introspection.InfoLine._fields
428429
django.db.backends.mysql.introspection.InfoLine.comment
429430
django.db.backends.mysql.introspection.TableInfo
430431
django.db.backends.mysql.schema.DatabaseSchemaEditor.sql_alter_column_comment
432+
django.db.backends.oracle.features.DatabaseFeatures.django_test_skips
431433
django.db.backends.oracle.features.DatabaseFeatures.introspected_field_types
432434
django.db.backends.oracle.features.DatabaseFeatures.supports_collation_on_charfield
435+
django.db.backends.oracle.features.DatabaseFeatures.supports_frame_exclusion
433436
django.db.backends.postgresql.base.DatabaseWrapper.Database
434437
django.db.backends.postgresql.base.DatabaseWrapper.ops
435438
django.db.backends.postgresql.base.DatabaseWrapper.tzinfo_factory

0 commit comments

Comments
 (0)