@@ -96,7 +96,7 @@ class PercentStyleMultiline(logging.PercentStyle):
9696 formats the message as if each line were logged separately.
9797 """
9898
99- def __init__ (self , fmt : str , auto_indent : Union [int , str , bool ]) -> None :
99+ def __init__ (self , fmt : str , auto_indent : Union [int , str , bool , None ]) -> None :
100100 super ().__init__ (fmt )
101101 self ._auto_indent = self ._get_auto_indent (auto_indent )
102102
@@ -109,7 +109,7 @@ def _update_message(
109109 return tmp
110110
111111 @staticmethod
112- def _get_auto_indent (auto_indent_option : Union [int , str , bool ]) -> int :
112+ def _get_auto_indent (auto_indent_option : Union [int , str , bool , None ]) -> int :
113113 """Determines the current auto indentation setting
114114
115115 Specify auto indent behavior (on/off/fixed) by passing in
@@ -139,7 +139,9 @@ def _get_auto_indent(auto_indent_option: Union[int, str, bool]) -> int:
139139 >0 (explicitly set indentation position).
140140 """
141141
142- if type (auto_indent_option ) is int :
142+ if auto_indent_option is None :
143+ return 0
144+ elif type (auto_indent_option ) is int :
143145 return int (auto_indent_option )
144146 elif type (auto_indent_option ) is str :
145147 try :
@@ -781,7 +783,9 @@ class _LiveLoggingStreamHandler(logging.StreamHandler):
781783 stream = None # type: TerminalReporter # type: ignore
782784
783785 def __init__ (
784- self , terminal_reporter : TerminalReporter , capture_manager : CaptureManager
786+ self ,
787+ terminal_reporter : TerminalReporter ,
788+ capture_manager : Optional [CaptureManager ],
785789 ) -> None :
786790 """
787791 :param _pytest.terminal.TerminalReporter terminal_reporter:
0 commit comments