Co-authored-by: UltralyticsAssistant <web@ultralytics.com>
Co-authored-by: Glenn Jocher <glenn.jocher@ultralytics.com>
This commit is contained in:
Paula Derrenger 2024-10-05 15:52:35 +02:00 committed by GitHub
parent 73e6861d95
commit 830e8334d7
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
18 changed files with 99 additions and 99 deletions

View file

@ -226,7 +226,7 @@ def remove_macros():
# Create a set of indices to remove (including lines before and after)
indices_to_remove = set()
for i in macros_indices:
indices_to_remove.update(range(i - 1, i + 4)) # i-1, i, i+1, i+2, i+3
indices_to_remove.update(range(i - 1, i + 3)) # i-1, i, i+1, i+2, i+3
# Create new list of lines, excluding the ones to remove
new_lines = [line for i, line in enumerate(lines) if i not in indices_to_remove]