[eradicate] Correctly handle metadata blocks directly followed by normal blocks (ERA001) (#15330)

## Summary

Resolves #15321.

## Test Plan

`cargo nextest run` and `cargo insta test`.
This commit is contained in:
InSync 2025-01-08 04:22:22 +07:00 committed by GitHub
parent b2a0d68d70
commit 3b3c2c5aa4
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 20 additions and 24 deletions

View file

@ -76,3 +76,16 @@ print(1)
# "requests<3",
# "rich",
# ]
# Script tag block followed by normal block (Ok)
# /// script
# # https://github.com/astral-sh/ruff/issues/15321
# requires-python = ">=3.12"
# dependencies = [
# "requests<3",
# "rich",
# ]
# ///
#
# Foobar