mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-25 23:05:00 +00:00
style: Format code with consistent quotes and spacing
This commit is contained in:
parent
70d10a0bb2
commit
dba5fb9dfa
1 changed files with 16 additions and 14 deletions
|
@ -6,6 +6,7 @@ import sys
|
|||
|
||||
import pyte
|
||||
|
||||
|
||||
def main():
|
||||
if len(sys.argv) != 3:
|
||||
print(f"Usage: {sys.argv[0]} input_cast_file output_cast_file")
|
||||
|
@ -19,7 +20,7 @@ def main():
|
|||
stream = pyte.Stream(screen)
|
||||
|
||||
# Read and parse the cast file
|
||||
with open(input_file, 'r') as f:
|
||||
with open(input_file, "r") as f:
|
||||
# First line is header
|
||||
header = f.readline().strip()
|
||||
|
||||
|
@ -31,7 +32,7 @@ def main():
|
|||
# Process each event through the terminal emulator
|
||||
for event in events:
|
||||
# Process the event in the terminal
|
||||
if len(event) >= 3 and event[1] == 'o': # Output event
|
||||
if len(event) >= 3 and event[1] == "o": # Output event
|
||||
stream.feed(event[2])
|
||||
|
||||
# Check if "Atuin" is visible on screen
|
||||
|
@ -43,10 +44,11 @@ def main():
|
|||
filtered_events.append(event)
|
||||
|
||||
# Write the filtered content to the output file
|
||||
with open(output_file, 'w') as f:
|
||||
f.write(header + '\n')
|
||||
with open(output_file, "w") as f:
|
||||
f.write(header + "\n")
|
||||
for event in filtered_events:
|
||||
f.write(json.dumps(event) + '\n')
|
||||
f.write(json.dumps(event) + "\n")
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue