Skip to content

Commit

Permalink
inherit from property for special-casing access
Browse files Browse the repository at this point in the history
  • Loading branch information
tungol committed Dec 23, 2024
1 parent 44c28b4 commit a4e5f7f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion stdlib/types.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -583,7 +583,9 @@ def prepare_class(
if sys.version_info >= (3, 12):
def get_original_bases(cls: type, /) -> tuple[Any, ...]: ...

class DynamicClassAttribute:
# Does not actually inherit from property, but saying it does makes sure that
# pyright handles this class correctly.
class DynamicClassAttribute(property):
fget: Callable[[Any], Any] | None
fset: Callable[[Any, Any], None] | None
fdel: Callable[[Any], None] | None
Expand Down

0 comments on commit a4e5f7f

Please sign in to comment.