()
| 41 | |
| 42 | |
| 43 | def discover_async_files() -> list[str]: |
| 44 | async_dir = SRC / "_async" |
| 45 | files: list[str] = [] |
| 46 | for path in sorted(async_dir.rglob("*.py")): |
| 47 | relpath = path.relative_to(SRC).as_posix() |
| 48 | if any( |
| 49 | relpath.startswith(excl) if excl.endswith("/") else relpath == excl |
| 50 | for excl in ASYNC_ONLY |
| 51 | ): |
| 52 | continue |
| 53 | files.append(relpath) |
| 54 | return files |
| 55 | |
| 56 | REMOVE_BLOCK = re.compile( |
| 57 | # Allow either a trailing newline or end-of-file after the end marker |