File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -189,7 +189,7 @@ def format(self, record: logging.LogRecord) -> str:
189189 import binascii
190190 import os
191191 import re
192- from typing import Any , cast
192+ from typing import Any , Optional , cast
193193
194194 recordcopy = copy (record )
195195
@@ -198,8 +198,8 @@ def format(self, record: logging.LogRecord) -> str:
198198 args_tuple = cast (tuple [Any , ...], recordcopy .args )
199199 scope = cast (dict [str , Any ], args_tuple [0 ])
200200 status_code = cast (int , args_tuple [1 ])
201- response_time = cast (float | None , args_tuple [2 ])
202- response_length = cast (int | None , args_tuple [3 ])
201+ response_time = cast (Optional [ float ] , args_tuple [2 ])
202+ response_length = cast (Optional [ int ] , args_tuple [3 ])
203203
204204 method = cast (str , scope .get ("method" , "" ))
205205 path = cast (str , scope .get ("path" , "" ))
You can’t perform that action at this time.
0 commit comments