Ultralytics Code Refactor https://ultralytics.com/actions (#16712)
Co-authored-by: UltralyticsAssistant <web@ultralytics.com> Co-authored-by: Glenn Jocher <glenn.jocher@ultralytics.com>
This commit is contained in:
parent
73e6861d95
commit
830e8334d7
18 changed files with 99 additions and 99 deletions
|
|
@ -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]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue