MCPcopy Create free account
hub / github.com/intelowlproject/IntelOwl / get_subclasses

Method get_subclasses

api_app/models.py:1480–1492  ·  view source on GitHub ↗

Returns a list of subclasses of PythonConfig. Returns: list[PythonConfig]: A list of subclasses.

(cls)

Source from the content-addressed store, hash-verified

1478
1479 @classmethod
1480 def get_subclasses(cls) -> typing.List["PythonConfig"]:
1481 """
1482 Returns a list of subclasses of PythonConfig.
1483
1484 Returns:
1485 list[PythonConfig]: A list of subclasses.
1486 """
1487 child_models = [ct.model_class() for ct in ContentType.objects.all()]
1488 return [
1489 model
1490 for model in child_models
1491 if (model is not None and issubclass(model, cls) and model is not cls)
1492 ]
1493
1494 @classproperty
1495 def plugin_type(cls) -> str:

Callers

nothing calls this directly

Calls 1

model_classMethod · 0.45

Tested by

no test coverage detected