mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-29 16:54:59 +00:00
style: fix linting issues in copypaste.py
This commit is contained in:
parent
6f36a97c4a
commit
2a1065efc1
1 changed files with 6 additions and 1 deletions
|
@ -1,7 +1,9 @@
|
||||||
import threading
|
import threading
|
||||||
import time
|
import time
|
||||||
|
|
||||||
import pyperclip
|
import pyperclip
|
||||||
|
|
||||||
|
|
||||||
class ClipboardWatcher:
|
class ClipboardWatcher:
|
||||||
"""Watches clipboard for changes and updates IO placeholder"""
|
"""Watches clipboard for changes and updates IO placeholder"""
|
||||||
|
|
||||||
|
@ -29,6 +31,7 @@ class ClipboardWatcher:
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
if self.verbose:
|
if self.verbose:
|
||||||
from aider.dump import dump
|
from aider.dump import dump
|
||||||
|
|
||||||
dump(f"Clipboard watcher error: {e}")
|
dump(f"Clipboard watcher error: {e}")
|
||||||
continue
|
continue
|
||||||
|
|
||||||
|
@ -44,13 +47,14 @@ class ClipboardWatcher:
|
||||||
self.watcher_thread = None
|
self.watcher_thread = None
|
||||||
self.stop_event = None
|
self.stop_event = None
|
||||||
|
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
"""Example usage of the clipboard watcher"""
|
"""Example usage of the clipboard watcher"""
|
||||||
from aider.io import InputOutput
|
from aider.io import InputOutput
|
||||||
|
|
||||||
io = InputOutput()
|
io = InputOutput()
|
||||||
watcher = ClipboardWatcher(io, verbose=True)
|
watcher = ClipboardWatcher(io, verbose=True)
|
||||||
|
|
||||||
try:
|
try:
|
||||||
watcher.start()
|
watcher.start()
|
||||||
while True:
|
while True:
|
||||||
|
@ -59,5 +63,6 @@ def main():
|
||||||
print("\nStopped watching clipboard")
|
print("\nStopped watching clipboard")
|
||||||
watcher.stop()
|
watcher.stop()
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
main()
|
main()
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue