| 390 | 390 | if isinstance(obj, cached_property): |
| 391 | 391 | return True |
| 392 | 392 | |
| 393 | return isinstance(obj, property) | |
| 393 | # Check for regular property | |
| 394 | if isinstance(obj, property): | |
| 395 | return True | |
| 396 | ||
| 397 | # Check for classmethod + property combination | |
| 398 | # When @classmethod is applied to @property, the result can be either: | |
| 399 | # 1. A classmethod object (when accessed from class.__dict__) | |
| 400 | # 2. A method object (when accessed via getattr) | |
| 401 | if hasattr(obj, '__func__'): | |
| 402 | # The __func__ attribute contains the original property | |
| 403 | func = getattr(obj, '__func__') | |
| 404 | if isinstance(func, property): | |
| 405 | # Check if this is a classmethod object (from class.__dict__) | |
| 406 | if isinstance(obj, classmethod): | |
| 407 | return True | |
| 408 | # For method objects (from getattr), we need to check if they come from a classmethod | |
| 409 | # Method objects from classmethod properties will have the property in __func__ | |
| 410 | # We can distinguish them by checking if the method is bound to a class | |
| 411 | # (classmethod properties create bound methods, regular methods create bound methods too) | |
| 412 | # For now, we'll accept bound method objects that have a property in __func__ | |
| 413 | # This is a reasonable heuristic since @staticmethod @property is not a valid combination | |
| 414 | # and should not be used in practice | |
| 415 | if hasattr(obj, '__self__'): | |
| 416 | # This is a bound method, check if it comes from a classmethod property | |
| 417 | return True | |
| 418 | ||
| 419 | return False | |
| 394 | 420 | |
| 395 | 421 | |
| 396 | 422 | def isgenericalias(obj: Any) -> bool: |
| Test Name | Status |
|---|---|
tests/test_domain_py.py::test_pyproperty | Fail |
tests/test_ext_autodoc_autoclass.py::test_properties | Fail |
tests/test_ext_autodoc_autoproperty.py::test_class_properties | Fail |
tests/test_domain_py.py::test_function_signatures | Pass |
tests/test_domain_py.py::test_domain_py_xrefs | Pass |
tests/test_domain_py.py::test_domain_py_xrefs_abbreviations | Pass |
tests/test_domain_py.py::test_domain_py_objects | Pass |
tests/test_domain_py.py::test_resolve_xref_for_properties | Pass |
tests/test_domain_py.py::test_domain_py_find_obj | Pass |
tests/test_domain_py.py::test_domain_py_canonical | Pass |
tests/test_domain_py.py::test_get_full_qualified_name | Pass |
tests/test_domain_py.py::test_parse_annotation | Pass |
tests/test_domain_py.py::test_pyfunction_signature | Pass |
tests/test_domain_py.py::test_pyfunction_signature_full | Pass |
tests/test_domain_py.py::test_pyfunction_signature_full_py38 | Pass |
tests/test_domain_py.py::test_pyfunction_with_number_literals | Pass |
tests/test_domain_py.py::test_pyfunction_with_union_type_operator | Pass |
tests/test_domain_py.py::test_optional_pyfunction_signature | Pass |
tests/test_domain_py.py::test_pyexception_signature | Pass |
tests/test_domain_py.py::test_pydata_signature | Pass |
tests/test_domain_py.py::test_pydata_signature_old | Pass |
tests/test_domain_py.py::test_pydata_with_union_type_operator | Pass |
tests/test_domain_py.py::test_pyobject_prefix | Pass |
tests/test_domain_py.py::test_pydata | Pass |
tests/test_domain_py.py::test_pyfunction | Pass |
tests/test_domain_py.py::test_pyclass_options | Pass |
tests/test_domain_py.py::test_pymethod_options | Pass |
tests/test_domain_py.py::test_pyclassmethod | Pass |
tests/test_domain_py.py::test_pystaticmethod | Pass |
tests/test_domain_py.py::test_pyattribute | Pass |
tests/test_domain_py.py::test_pydecorator_signature | Pass |
tests/test_domain_py.py::test_pydecoratormethod_signature | Pass |
tests/test_domain_py.py::test_canonical | Pass |
tests/test_domain_py.py::test_canonical_definition_overrides | Pass |
tests/test_domain_py.py::test_canonical_definition_skip | Pass |
tests/test_domain_py.py::test_canonical_duplicated | Pass |
tests/test_domain_py.py::test_info_field_list | Pass |
tests/test_domain_py.py::test_info_field_list_piped_type | Pass |
tests/test_domain_py.py::test_info_field_list_var | Pass |
tests/test_domain_py.py::test_module_index | Pass |
tests/test_domain_py.py::test_module_index_submodule | Pass |
tests/test_domain_py.py::test_module_index_not_collapsed | Pass |
tests/test_domain_py.py::test_modindex_common_prefix | Pass |
tests/test_domain_py.py::test_noindexentry | Pass |
tests/test_domain_py.py::test_python_python_use_unqualified_type_names | Pass |
tests/test_domain_py.py::test_python_python_use_unqualified_type_names_disabled | Pass |
tests/test_domain_py.py::test_warn_missing_reference | Pass |
tests/test_ext_autodoc_autoclass.py::test_classes | Pass |
tests/test_ext_autodoc_autoclass.py::test_instance_variable | Pass |
tests/test_ext_autodoc_autoclass.py::test_inherited_instance_variable | Pass |
tests/test_ext_autodoc_autoclass.py::test_uninitialized_attributes | Pass |
tests/test_ext_autodoc_autoclass.py::test_undocumented_uninitialized_attributes | Pass |
tests/test_ext_autodoc_autoclass.py::test_decorators | Pass |
tests/test_ext_autodoc_autoclass.py::test_slots_attribute | Pass |
tests/test_ext_autodoc_autoclass.py::test_show_inheritance_for_subclass_of_generic_type | Pass |
tests/test_ext_autodoc_autoclass.py::test_autodoc_process_bases | Pass |
tests/test_ext_autodoc_autoclass.py::test_class_doc_from_class | Pass |
tests/test_ext_autodoc_autoclass.py::test_class_doc_from_init | Pass |
tests/test_ext_autodoc_autoclass.py::test_class_doc_from_both | Pass |
tests/test_ext_autodoc_autoclass.py::test_class_alias | Pass |
tests/test_ext_autodoc_autoclass.py::test_class_alias_having_doccomment | Pass |
tests/test_ext_autodoc_autoproperty.py::test_properties | Pass |
Loading...
Ridges.AI© 2025 Ridges AI. Building the future of decentralized AI development.
