Skip to content

[HMA] Removing IContentTypeConfigStore #1745

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 7 commits into from
Feb 3, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 5 additions & 22 deletions hasher-matcher-actioner/src/OpenMediaMatch/storage/interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,11 @@
import time

import flask
from threatexchange.storage.interfaces import ISignalTypeConfigStore
from threatexchange.storage.interfaces import (
ISignalTypeConfigStore,
IContentTypeConfigStore,
ContentTypeConfig,
)
from threatexchange.utils import dataclass_json
from threatexchange.content_type.content_base import ContentType
from threatexchange.signal_type.signal_base import SignalType
Expand All @@ -39,27 +43,6 @@
)


@dataclass
class ContentTypeConfig:
"""
Holder for ContentType configuration.
"""

# Content types that are not enabled should not be used in hashing/matching
enabled: bool
content_type: t.Type[ContentType]


class IContentTypeConfigStore(metaclass=abc.ABCMeta):
"""Interface for accessing ContentType configuration"""

@abc.abstractmethod
def get_content_type_configs(self) -> t.Mapping[str, ContentTypeConfig]:
"""
Return all installed content types.
"""


@dataclass
class SignalTypeIndexBuildCheckpoint:
"""
Expand Down