<commit_before>"""Kraken - objects.curve module.

Classes:
Curve - Curve.

"""

from kraken.core.objects.scene_item import SceneItem

import copy


class Curve(SceneItem):
    """Curve object."""

    __kType__ = "Curve"

    def __init__(self, name, parent=None):
        super(Curve, self).__init__(name, parent=parent)

        self._data = None


    # ======================
    # Control Point Methods
    # ======================
    def getCurveData(self):
        """Returns the data of the curve.

        Return:
        List, dictionaries defining each sub-curve of this curve.

        """

        return self._data


    def setCurveData(self, data):
        """Sets the curve data.

        Arguments:
        data -- List, dictionaries defining each sub-curve of this curve.

        Return:
        True if successful.

        """

        self._data = list(data)

        return True


    def appendCurveData(self, data):
        """Appends sub-curve data to this curve.

        Arguments:
        data -- List, dictionaries defining each sub-curve being added to this
        curve.

        Return:
        True if successful.

        """

        self._data += data

        return True


    # ==================<commit_msg>Fixed bug where control shapes weren't uniqe.<commit_after>"""Kraken - objects.curve module.

Classes:
Curve - Curve.

"""

from kraken.core.objects.scene_item import SceneItem

import copy


class Curve(SceneItem):
    """Curve object."""

    __kType__ = "Curve"

    def __init__(self, name, parent=None):
        super(Curve, self).__init__(name, parent=parent)

        self._data = None


    # ======================
    # Control Point Methods
    # ======================
    def getCurveData(self):
        """Returns the data of the curve.

        Return:
        List, dictionaries defining each sub-curve of this curve.

        """

        return self._data


    def setCurveData(self, data):
        """Sets the curve data.

        Arguments:
        data -- List, dictionaries defining each sub-curve of this curve.

        Return:
        True if successful.

        """

        self._data = copy.deepcopy(data)

        return True


    def appendCurveData(self, data):
        """Appends sub-curve data to this curve.

        Arguments:
        data -- List, dictionaries defining each sub-curve being added to this
        curve.

        Return:
        True if successful.

        """

        self._data += data

        return True


    # ==================
{'fraction_non_alphanumeric': 0.13802595359811246, 'fraction_numerical': 0.0, 'mean_word_length': 2.0467065868263474, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6065936', 'n_tokens_mistral': 742, 'n_tokens_neox': 672, 'n_words': 212}