INNER CODE UNIT · Python

combine_tags

infosecB/LOOBins · src/pyloobins/models.py:100

    def combine_tags(self) -> List[str]:
        """Returns a list of all tags across all LOOBin example use cases"""
        return list(
            dict.fromkeys(
                tag
                for euc in self.example_use_cases
                if euc.tags is not None
                for tag in euc.tags
            )
        )

    def to_yaml(self, exclude_null: bool = True) -> str:
        """Convert a LOOBin object to a YAML string"""
        return yaml.dump(
            self.model_dump(exclude_none=exclude_null),
            Dumper=yaml.Dumper,
            sort_keys=False,
        )

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…