class Encoder(object):
    @staticmethod
    def encode(msg):
        """
        Don't change the message at all
        :param msg:
        """
        return msg

try:
    # Test for mypy support (requires Python 3)
    from typing import Text
except:
    pass

class Encoder(object):
    @staticmethod
    def encode(msg):
        # type: (bytes) -> List[bytes]
        """
        Don't change the message at all
        :param msg:
        """
        return [msg]

Return a list of messages in echo encoder and add mypy type hints
Return a list of messages in echo encoder and add mypy type hints

+ try:
+     # Test for mypy support (requires Python 3)
+     from typing import Text
+ except:
+     pass
+ 
  class Encoder(object):
      @staticmethod
      def encode(msg):
+         # type: (bytes) -> List[bytes]
          """
          Don't change the message at all
          :param msg:
          """
-         return msg
+         return [msg]
  
Return a list of messages in echo encoder and add mypy type hints
## Code Before:
class Encoder(object):
    @staticmethod
    def encode(msg):
        """
        Don't change the message at all
        :param msg:
        """
        return msg

## Instruction:
Return a list of messages in echo encoder and add mypy type hints
## Code After:
try:
    # Test for mypy support (requires Python 3)
    from typing import Text
except:
    pass

class Encoder(object):
    @staticmethod
    def encode(msg):
        # type: (bytes) -> List[bytes]
        """
        Don't change the message at all
        :param msg:
        """
        return [msg]
