message: Code polish in _TypeSpecCodec.can_enocde:
  - Explicitly return False for unhandled cases instead of falling through
  to return None implicitly.
  - Restrict pylint exemption to the single line it affects.
diff: @@ -528,8 +528,7 @@ class _TypeSpecCodec(object):
  def can_encode(self, pyobj):
  """Returns true if `pyboj` can be encoded as a TypeSpec."""
  - # pylint: disable=unidiomatic-typecheck
  - if type(pyobj) in self.TYPE_SPEC_CLASS_TO_PROTO:
  + if type(pyobj) in self.TYPE_SPEC_CLASS_TO_PROTO: # pylint: disable=unidiomatic-typecheck
  return True
  # Check if it's a registered type.
  @@ -540,6 +539,8 @@ class _TypeSpecCodec(object):
  except ValueError:
  return False
  + return False
  +
  def do_encode(self, type_spec_value, encode_fn):
  """Returns an encoded proto for the given `tf.TypeSpec`."""
  type_spec_class = self.TYPE_SPEC_CLASS_TO_PROTO.get(type(type_spec_value))
  