from typing import List


class Aspect:
    """Define a species aspect."""
    def __init__(
            self,
            description=None,
            categories: set = None,
            naming: List[str] = None,
    ):
        if categories is None:
            categories = set()
        if naming is None:
            naming = []
        self.description = description
        self.categories = categories.union(set())
        self.naming = naming
        self.symbology = set()

    def conflicts_with(self, other):
        return self.categories and self.categories.intersection(other.categories)


def with_no_conflicts(aspects):
    """Remove conflicts until no conflict is present."""
    output = []
    conflict_categories = set()
    for aspect in aspects:
        if not aspect.categories.intersection(conflict_categories):
            output.append(aspect)
            conflict_categories |= aspect.categories
    return output
