
from collections import namedtuple
from enum import Enum


class Dimensions(namedtuple('Dimensions', ['width', 'height'])):
    """A 2D image's width and height."""

    __slots__ = ()

    @property
    def is_square(self):
        return self.width == self.height


ImageType = Enum('ImageType', ['gif', 'jpeg', 'png'])  # type: ignore


from collections import namedtuple
from enum import Enum


class Dimensions(namedtuple('Dimensions', ['width', 'height'])):
    """A 2D image's width and height."""

    __slots__ = ()

    @property
    def is_square(self):
        return self.width == self.height


ImageType = Enum('ImageType', ['gif', 'jpeg', 'png'])

Remove type ignore comment from functional enum API call
Remove type ignore comment from functional enum API call

This is supported as of Mypy 0.510 and no longer raises an error.

  
  from collections import namedtuple
  from enum import Enum
  
  
  class Dimensions(namedtuple('Dimensions', ['width', 'height'])):
      """A 2D image's width and height."""
  
      __slots__ = ()
  
      @property
      def is_square(self):
          return self.width == self.height
  
  
- ImageType = Enum('ImageType', ['gif', 'jpeg', 'png'])  # type: ignore
+ ImageType = Enum('ImageType', ['gif', 'jpeg', 'png'])
  
Remove type ignore comment from functional enum API call
## Code Before:

from collections import namedtuple
from enum import Enum


class Dimensions(namedtuple('Dimensions', ['width', 'height'])):
    """A 2D image's width and height."""

    __slots__ = ()

    @property
    def is_square(self):
        return self.width == self.height


ImageType = Enum('ImageType', ['gif', 'jpeg', 'png'])  # type: ignore

## Instruction:
Remove type ignore comment from functional enum API call
## Code After:

from collections import namedtuple
from enum import Enum


class Dimensions(namedtuple('Dimensions', ['width', 'height'])):
    """A 2D image's width and height."""

    __slots__ = ()

    @property
    def is_square(self):
        return self.width == self.height


ImageType = Enum('ImageType', ['gif', 'jpeg', 'png'])
