original_docstring:  Install the formatter on stream handlers on all handlers of the root logger that are attached to a TTY,
      or otherwise on all that are not attached to a TTY based on the *target* value. If no value is specified, it
      will install into TTY-attached stream handlers if #styles is set. 
docstring: Install the formatter on stream handlers on all handlers of the root logger that are attached to a TTY,
  or otherwise on all that are not attached to a TTY based on the *target* value. If no value is specified, it
  will install into TTY-attached stream handlers if #styles is set.
docstring_tokens: Install the formatter on stream handlers on all handlers of the root logger that are attached to a TTY or otherwise on all that are not attached to a TTY based on the * target * value . If no value is specified it will install into TTY - attached stream handlers if #styles is set .
code: def install(self, target: te.Literal['tty', 'notty'] | None = None) -> None:
      """ Install the formatter on stream handlers on all handlers of the root logger that are attached to a TTY,
      or otherwise on all that are not attached to a TTY based on the *target* value. If no value is specified, it
      will install into TTY-attached stream handlers if #styles is set. """
  
      if target is None:
        target = 'notty' if self.styles is None else 'tty'
  
      for handler in logging.root.handlers:
        if isinstance(handler, logging.StreamHandler) and handler.stream.isatty():
          if target == 'tty':
            handler.setFormatter(self)
        elif target == 'notty':
            handler.setFormatter(self)
code_tokens: def install ( self , target : te . Literal [ 'tty' , 'notty' ] | None = None ) -> None : if target is None : target = 'notty' if self . styles is None else 'tty' for handler in logging . root . handlers : if isinstance ( handler , logging . StreamHandler ) and handler . stream . isatty ( ) : if target == 'tty' : handler . setFormatter ( self ) elif target == 'notty' : handler . setFormatter ( self )
short_docstring: Install the formatter on stream handlers on all handlers of the root logger that are attached to a TTY,
  or otherwise on all that are not attached to a TTY based on the *target* value.
short_docstring_tokens: Install the formatter on stream handlers on all handlers of the root logger that are attached to a TTY or otherwise on all that are not attached to a TTY based on the * target * value .
comment: """ Install the formatter on stream handlers on all handlers of the root logger that are attached to a TTY,
      or otherwise on all that are not attached to a TTY based on the *target* value. If no value is specified, it
      will install into TTY-attached stream handlers if #styles is set. """