File tree 2 files changed +2
-2
lines changed
2 files changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -178,7 +178,7 @@ def has_any_validation_error() -> bool:
178
178
from prompt_toolkit .layout .controls import UIControl , BufferControl , SearchBufferControl
179
179
180
180
# Extract buffer validation errors for buffer UIControl children classes
181
- def get_buffer_from_content (content : UIControl ):
181
+ def get_buffer_from_content (content : UIControl ) -> bool :
182
182
if isinstance (content , (BufferControl , SearchBufferControl )):
183
183
return content .buffer .validation_error is not None
184
184
else :
Original file line number Diff line number Diff line change @@ -342,7 +342,7 @@ def __pt_container__(self) -> Container:
342
342
343
343
344
344
class ValidationToolbar :
345
- def __init__ (self , show_position : bool = False , buffer : Buffer = None ) -> None :
345
+ def __init__ (self , show_position : bool = False , buffer : Buffer | None = None ) -> None :
346
346
def get_formatted_text () -> StyleAndTextTuples :
347
347
# If buffer not specified, use the currently focused buffer
348
348
if buffer is None :
You can’t perform that action at this time.
0 commit comments