# Aider chat conversation:
USER: make sire self.live.stop() is called no matter how the object gets destroyed
ASSISTANT: To ensure that `self.live.stop()` is called no matter how the object gets destroyed, we can use Python's built-in `__del__` method. This method is called when an object is about to be destroyed. We can override this method in our `MarkdownStream` class to stop the `Live` instance.
Here are the steps to make this change:
1. Add a `__del__` method to the `MarkdownStream` class that calls `self.live.stop()`.
Here is the *SEARCH/REPLACE* block:
aider/mdstream.py
<source>python
<<<<<<< SEARCH
class MarkdownStream:
live = None
when = 0
min_delay = 0.050
live_window = 6
def __init__(self):
self.printed = []
self.live = Live(Text(''), refresh_per_second=1./self.min_delay)
self.live.start()
=======
class MarkdownStream:
live = None
when = 0
min_delay = 0.050
live_window = 6
def __init__(self):
self.printed = []
self.live = Live(Text(''), refresh_per_second=1./self.min_delay)
self.live.start()
def __del__(self):
self.live.stop()
>>>>>>> REPLACE
</source>
# Aider chat conversation:
USER: mark _text as noqa 501
ASSISTANT: To mark `_text` as `noqa 501`, we need to modify `aider/mdstream.py`:
1. Add `# noqa: 501` at the end of the `_text` variable declaration.
Here is the *SEARCH/REPLACE* block:
aider/mdstream.py
<source>python
<<<<<<< SEARCH
_text = 5 * _text
=======
_text = 5 * _text # noqa: 501
>>>>>>> REPLACE
</source>
Adds option to skip the check for an update, better supports tooling which wants to do it's own update mechanism and not have aider print it out unconditionally.