#
# Project:   retdec-python
# Copyright: (c) 2015 by Petr Zemek <s3rvac@gmail.com> and contributors
# License:   MIT, see the LICENSE file for more details
#

"""Phase of a decompilation."""


class DecompilationPhase:
    """Phase of a decompilation."""

    def __init__(self, name, part, description, completion):
        """Initializes the phase."""
        self._name = name
        self._part = part
        self._description = description
        self._completion = completion

    @property
    def name(self):
        """Name of the phase (`str`)."""
        return self._name

    @property
    def part(self):
        """Part to which the phase belongs (`str`).

        May be ``None`` if the phase does not belong to any part.
        """
        return self._part

    @property
    def description(self):
        """Description of the phase (`str`)."""
        return self._description

    @property
    def completion(self):
        """Completion (in percentages, ``0-100``)."""
        return self._completion

    def __eq__(self, other):
        return (self.__class__ == other.__class__ and
                self.__dict__ == other.__dict__)

    def __ne__(self, other):
        return not self == other

    def __repr__(self):
        return '{}(name={!r}, part={!r}, description={!r}, completion={})'.format(
            __name__ + '.' + self.__class__.__name__,
            self.name,
            self.part,
            self.description,
            self.completion
        )

@@ -344,16 +344,381 @@
 e phase.
+%0A%0A        :param str name: Name of the phase.%0A        :param str part: Part into which the phase belongs.%0A        :param str description: Description of the phase.%0A        :param int completion: What percentage of the decompilation has been%0A                               completed?%0A%0A        %60part%60 may be %60%60None%60%60 if the phase does not belong to any part.%0A        
 %22%22%22%0A    

Add a missing description of DecompilationPhase parameters.