
from enum import Enum

class LineChange:

    class ChangeType(Enum):
            added = 1
            deleted = 2
            modified = 3

    def __init__(self, number=None, change_type=None, filename=None, commit=None):
        self.number = number
        self.change_type = change_type
        self.filename = filename
        self.commit = commit
        self.author = None

    def __str__(self):
        return ', '.join("{}: {}".format(k, str(v)) for k,v in vars(self).items())

    def __repr__(self):
        return "<{klass} {str}>".format(klass=self.__class__.__name__, str=str(self))


from enum import Enum

class LineChange:

    class ChangeType(Enum):
        added = 1
        deleted = 2
        modified = 3

    def __init__(self, line_number=None, change_type=None, file_path=None, commit_sha=None):
        self.line_number = line_number
        self.change_type = change_type
        self.file_path = file_path
        self.commit_sha = commit_sha
        self.author = None

    def __str__(self):
        return ', '.join("{}: {}".format(k, str(v)) for k,v in vars(self).items())

    def __repr__(self):
        return "<{klass} {str}>".format(klass=self.__class__.__name__, str=str(self))

    def __eq__(self, other):
        if isinstance(other, self.__class__):
            return self.__dict__ == other.__dict__
        else:
            return False

    def __ne__(self, other):
        return not self.__eq__(other)
Add equlaity comparisons to LineChange class.
Add equlaity comparisons to LineChange class.

  
  from enum import Enum
  
  class LineChange:
  
      class ChangeType(Enum):
-             added = 1
+         added = 1
-             deleted = 2
+         deleted = 2
-             modified = 3
+         modified = 3
  
-     def __init__(self, number=None, change_type=None, filename=None, commit=None):
+     def __init__(self, line_number=None, change_type=None, file_path=None, commit_sha=None):
-         self.number = number
+         self.line_number = line_number
          self.change_type = change_type
-         self.filename = filename
+         self.file_path = file_path
-         self.commit = commit
+         self.commit_sha = commit_sha
          self.author = None
  
      def __str__(self):
          return ', '.join("{}: {}".format(k, str(v)) for k,v in vars(self).items())
  
      def __repr__(self):
          return "<{klass} {str}>".format(klass=self.__class__.__name__, str=str(self))
  
+     def __eq__(self, other):
+         if isinstance(other, self.__class__):
+             return self.__dict__ == other.__dict__
+         else:
+             return False
+ 
+     def __ne__(self, other):
+         return not self.__eq__(other)
Add equlaity comparisons to LineChange class.
## Code Before:

from enum import Enum

class LineChange:

    class ChangeType(Enum):
            added = 1
            deleted = 2
            modified = 3

    def __init__(self, number=None, change_type=None, filename=None, commit=None):
        self.number = number
        self.change_type = change_type
        self.filename = filename
        self.commit = commit
        self.author = None

    def __str__(self):
        return ', '.join("{}: {}".format(k, str(v)) for k,v in vars(self).items())

    def __repr__(self):
        return "<{klass} {str}>".format(klass=self.__class__.__name__, str=str(self))

## Instruction:
Add equlaity comparisons to LineChange class.
## Code After:

from enum import Enum

class LineChange:

    class ChangeType(Enum):
        added = 1
        deleted = 2
        modified = 3

    def __init__(self, line_number=None, change_type=None, file_path=None, commit_sha=None):
        self.line_number = line_number
        self.change_type = change_type
        self.file_path = file_path
        self.commit_sha = commit_sha
        self.author = None

    def __str__(self):
        return ', '.join("{}: {}".format(k, str(v)) for k,v in vars(self).items())

    def __repr__(self):
        return "<{klass} {str}>".format(klass=self.__class__.__name__, str=str(self))

    def __eq__(self, other):
        if isinstance(other, self.__class__):
            return self.__dict__ == other.__dict__
        else:
            return False

    def __ne__(self, other):
        return not self.__eq__(other)