Besides, I don't like the following. ViewCompletionManager shouldn't be coupled with phantom-related thing.
class ViewCompletionManager:
@property
def is_phantom(self) -> bool:
return self.completion_style == _PhantomCompletion.STYLE_TYPE
def handle_selection_change(self) -> None:
if not (self.is_phantom and self.is_visible):
return
self.hide()
def handle_text_change(self) -> None:
if not (self.is_phantom and self.is_visible):
return
self.hide()
def handle_close(self) -> None:
if not self.is_phantom:
return
self.completion_style_type.close(self.view)
Besides, I don't like the following.
ViewCompletionManager
shouldn't be coupled withphantom
-related thing.