cls, "__sa_dataclass_metadata_key__"
            )
        else:
            sa_dataclass_metadata_key = None
        if not sa_dataclass_metadata_key:
            def local_attributes_for_class() -> (
                Iterable[Tuple[str, Any, Any, bool]]
            ):
                return (
                    (
                        name,
                        cls_vars.get(name),
                        cls_annotations.get(name),
                        False,
                    )
                    for name in names
                )
        else:
            dataclass_fields = {
                field.name: field for field in util.local_dataclass_fields(cls)
            }
            fixed_sa_dataclass_metadata_key = sa_dataclass_metadata_key
            def local_attributes_for_class() -> (
                Iterable[Tuple[str, Any, Any, bool]]
            ):
                for name in names:
                    field = dataclass_fields.get(name, None)
                    if field and sa_dataclass_metadata_key in field.metadata:
                        yield field.name, _as_dc_declaredattr(
                            field.metadata, fixed_sa_dataclass_metadata_key
                        ), cls_annotations.get(field.name), True
                    else:
                        yield name, cls_vars.get(name), cls_annotations.get(
                            name
                        ), False
        return local_attributes_for_class
    def _scan_attributes(self) -> None:
        cls = self.cls
        cls_as_Decl = cast("_DeclMappedClassProtocol[Any]", cls)
        clsdict_view = self.clsdict_view
        collected_attributes = self.collected_attributes
        column_copies = self.column_copies
        _include_dunders = self._include_dunders
        mapper_args_fn = None
        table_args = inherited_table_args = None
        tablename = None
        fixed_table = "__table__" in clsdict_view
        attribute_is_overridden = self._cls_attr_override_checker(self.cls)